* update surefire to newer version
* small tweak to add support for "leeway" when verifying oauth tokens.
Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Bruno Flamand <bflamand@stingray.com>
* Content mediatype is hardcoded in api.mustache #11511
* Generate Samples
* OAS3 incorrect data type when providing a default value #11367
* Generate Samples
* Fix JsonTypeName annotation handling in Java and JavaSpring
* Generate Samples
* getIsClassnameSanitized: use null safe equals
* remove import mapping logic in model generation, better handle of file, list
* add new files for file, list
* fix some tests
* update tests, doc
* skip file as reserved word in feign client
* add new files
* remove file from reserved word list in spring generator
* first commit: add cli option for saga and records. Added dummy sagas.mustache test file.
* More progress with default values. First prototype for isEntity and isUniqueId.
* record generation complete
* record generation complete
* progress with saga generation
* progress with saga generation
* first fully working saga generation
* merge with latest master
* removed unneeded "items" properties.
* moved global CodegenModel modifications into subclass ExtendedCodegenModel used exclusively by TypescriptFetchClient. Adding missing samples files.
* moved global CodegenOperation modifications into subclass ExtendedCodegenOperation used exclusively by TypescriptFetchClient.
* moved global CodegenProperty modifications into subclass ExtendedCodegenProperty used exclusively by TypescriptFetchClient.
* moved global CodegenParameter modifications into subclass ExtendedCodegenParameter used exclusively by TypescriptFetchClient.
* added the missing "allSagas" export.
* renamed & reworked "meta data response" flags to a more useful general concept of "operation return passthrough"
* added vendor flag keepAsJSObject as escape hatch to support circular dependencies in models and other special cases. Also fixed issues with default values for some records properties.
* added autodetection for passthrough to simplify standardised specs.
* fix small issue with passthrough void
* fix small issues with passthrough void and missing passthrough imports in some cases. Fix issues with enum default values.
* fix small issues with passthrough void and missing passthrough imports in some cases. Fix issues with enum default values.
* Added "reservedRecordField" feature to support remapping fields names that cannot be used in Records. Added missing export to record: toApi().
* added uniqueId inference. Fix small generation when uniqueId property is an array.
* removed feature "reservedRecordField" and replaced it with existing built-in "reserved words" feature. Fix minor issues with typings in generated files.
* Changed api recType names to make them less likely to cause name conflicts. Added generated ApiEntities (record, reducer & selector) files.
* Moved location of ApiEntities related files and fix issues with exports.
* - merge latest master
- renamed fake test apis to better fit the "pet theme"
- added mode for "SourceOnlyLibrary" (same as used in codegen typescript jquery)
* - missing ganarate sampless
* - Modified way to export apiEntitiesSelectpr to reduce typescript analysis time for consuming project. Removed tab characters in mustache files. Reformat code for TypeScriptFetchClientCodegen to try to remove false positive for tabs vs spaces.
* - added markErrorsAsHandled property to api sagas. Increased typescript version to address some typing errors on library build.
* - fix bug in saga interfaces. Upgraded to typescript "strict" mode to ensure proper typechecking info is generated.
* - added optional id for apiEntity selectors. Added toInlined() support to convert an entity to an inlined model recursively.
* - minor tweak for apiEntitySelector to accept null id
* - minor tweak for apiEntitySelector
* - runned ensure up to date.
* Revert "- runned ensure up to date."
This reverts commit ea9b4aed
* - runned ensure up to date.
* - runned ensure up to date.
* - added more enhancements: New "toInlined" functionality. Support for more complex double array types. apiBaseConfiguration is not sent completely for Api.init().
* - merge master
* - fix generated api bug in some cases for typescript fetch when no request params are present.
* - commented broken tests
* - fix generate samples analysis.
* - work in progress for playframework swagger upgrade
* - first working output for playframework with oauth support for access code flow.
* update surefire to newer version
* added new sample project "...playframework-with-security.yaml" and improved tab in generated output for controllerImp files.
* split SecurityAPIUtil into more granular and useful functions.
* minor fix to have tab instead of spaces in securityapiutils mustache file
* added missing generated samples.
* added missing securityAPIUtils injection in generated "Controller" classes when "useInterfaces = false"
* added missing securityAPIUtils import
* added missing securityAPIUtils import for no-interface samples files.
* minor tweak: changed order of import for securityApiUtils
* minor tweak: changed order of import for securityApiUtils
* fix: securityApiUtils was incorrectly declared with "throws Exception"
* minor code tweak.
* fix potential runtime throw in SecurityApiUtils if playframework configuration variables are not found. fix minor issue with space vs tab in mustache files. Fix compilation issues in some cases when using async mode.
* run ensure-up-to-date and generate-samples
* Revert "run ensure-up-to-date and generate-samples"
This reverts commit da4d3ac7552376268fdb800fc7d42722367e9e47.
Co-authored-by: Bruno Flamand <bflamand@stingray.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Update the bean validation to use version 2.0. For a reason I don't know, it was not working anymore with version 1.
* better format
Co-authored-by: William Cheng <wing328hk@gmail.com>
* First iteration to support new mechanism that needs to have the handle of the result.
* Most of the samples now build except "async". Also, everything is messed up.. need to understand the mustache way to handle this.
* New version to support play 2.8
* Fix conflict
* Fix error when multiple file in forms
* Fix the new package that deal with Configuration (the old one is depecrated)
* First version to support Play Framework 2.7
* Fix small problems that prevent compilation of each samples. Now everything is compiling perfectly
* Update play framework minor version + scala + swagger-ui + Remove bugs in the url of swagger-ui.
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists
- Update Java code generation to use sets instead of lists when uniqueItems is set to true
- Add import resolution for sets
- Add tests and fix broke tests
resolve#5254
* Update Javascript, Perl, Python and Ruby to preserve current functionality.
* Switch set implementation to LinkedHashSet
* Fix missing import for uniqueItems used on param.
* Fix missing import and return type for responses with uniqueItems
* Fix default values for array of enum
* Update generated samples
* fix merge issue
* Update generated samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Add configuration to split input and output bean validations. When useBeanValidation is used, the variable are created in the application.conf file and can be tweaked by environment. For example, dev and stage can have true to both but only have input in prod.
* Refactor of mustache tags for more clarity
* sample generation with refactor
* Fix a couple of bugs with the fake-endpoint yaml but there is still 2 cases where it doesn't work.
* Removals of most of the warnings found by lint
* Removals of most of the warnings found by lint (PART 2)
* Removals of most of the warnings found by lint (PART 3)
* Removals of most of the warnings found by lint (PART 4)
* Removals of most of the warnings found by lint (PART 5)
* Fix conversion error
* Removal of unnecessary import. Other will need more complex login in the generator itself (not in the mustache files)
* Add missing imports + fix to the regex. Generation of the samples
* Fix issue #6100. Tested with all the samples.
* Fix multiple issue with the examples. Removing all of this.
Adding fake endpoint .sh but it is not compiling right now.
* Fix issue 5460
* Handling only first and last double quote to support example with double quote in the middle
* Fix proposed by @ePaul
* Add comments to explain de fixStringModel function. Add an enum model called PetStatus that test this scenario. Update sample only for JavaPlayFramework generator
* Add automatic validation of return type when beanValidation is activated
* Small fixes for the automatic validation
* Add validation of entering body object + fix problem when receiving list + do not validate when the return value is a file
* Major fix to the collection handling in Play Framework Generator
* Major fix to the collection handling in Play Framework Generator (small details missing from previous commit)
* Add the fix to header and form parameters too
* Fix to the default values. It did not take care of the "default" and also was setting to a bad default when not set.
* Just make a difference between string and non string instead of placing all types in the mustache file
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.
* Fix suggestions in the PR discussion + add .bat and .sh file as requested.
* Updated Readme.md file
* Remove unused mustache file + fix baseName vs paramName in all the mustache files.
* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.
* Fix the problem with the Http.MultipartFormData.FilePart
* Removal of warning (final) and fix of a missing default value for boolean query parameters
This is the result of
- `$ git checkout master`
- `$ bin/run-all-petstore`
No change was made to the code, just ran the aggregate sample generation
script.
Commit e3d04ee01 (issue #5240) introduced unsafe add/put methods for optional
list/map parameters. This change maintains the spirit of issue #5240 (optional
containers are null by default) while still making add/put calls safe. It does
this by checking for null first and, if so, initializing it with an empty
container.
Also updated the affected samples using the various scripts in bin/.
* set list to null in java if not required
* update petstore sample for java server stub
* update sample for msf4j
* add null assignment to new list/map in java
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.
* Fix suggestions in the PR discussion + add .bat and .sh file as requested.
* Updated Readme.md file
* Remove unused mustache file + fix baseName vs paramName in all the mustache files.
* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.
* Fix the problem with the Http.MultipartFormData.FilePart
* Return a FileInputStream when the returnType is "file" + Fix a couple of other bugs with boolean + updated sample
* Return an InputStream instead of FileInputStream (except in the instantiation)
* A little cleanup for the form param of type file.
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.
* Fix suggestions in the PR discussion + add .bat and .sh file as requested.
* Updated Readme.md file
* Remove unused mustache file + fix baseName vs paramName in all the mustache files.
* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.
* Fix the problem with the Http.MultipartFormData.FilePart
* - Add "wrapCalls" and "useSwaggerUI" CLI Options and updated what handleException does to follow Play Framework lifecycle more closely
- Updated all mustache files accordingly
- Updated the sample
- Updates Play Framework version to the latest 2.5.13
* First commit of the Java Play Framework server generator. It is highly based on Spring so there might me a couple of things that don't make sense (like options or parameters) for the Play Framework.
* Fix suggestions in the PR discussion + add .bat and .sh file as requested.
* Updated Readme.md file
* Remove unused mustache file + fix baseName vs paramName in all the mustache files.
* Add an CLI option to generate interface. These interfaces are implemented by the controllerImp and help to generate the code with an IDE like IntelliJ because on updates of the code the controllerImp must follow the contract of the interface. If it don't, IDE will provide support to generate missing functions or parameters. I also did some cleanup of options we don't use in Play Framework.
* Fix the compilation error when we have a body which is a list or map. Doesn't fix the problem with the annotation itself.
* Fix the problem with the Http.MultipartFormData.FilePart
* Small fixes
* Remove everything related to swagger-play. No need for annotation anymore because we export the swagger.json directly and show the documentation using swagger-ui with the direct path. Also added the sample.
* Remove/Rename paramsX mustache because there is no more documentation. Remove unused file. updated sample
* Fix the problem with default values that was not set correctly.
* Small fix related to bad merging
* Add handleException CLI options
* Fix default values once and for all!
* Update sample files + fix bug
* Fix bug with body that is required and have a list as a parameter + add bean import for interface to prevent compilation error