119 Commits

Author SHA1 Message Date
Aliaksei
809b3331a9
[4947][java]: adds support for validation of primitives in arrays (#17165)
* [4947][java]: adds support for validation of primitives in arrays

* [4947][java]: prevents generation '@Valid' for Object

* [4947][java]: test against different codegens and stick to primitive

* [4947][java]: code review

* [4947][java]: enhance getBeanValidation

* [4947][java]: adds email

* [4947][java]: removes unnecessary override

* [4947][java]: adds postProcessResponseWithProperty

* [4947][java]: adds missing import {{javaxPackage}}.validation.Valid

* [4947][java]: adds missing useBeanValidation

* [4947][java]: fix use rootJavaEEPackage for helidon
2023-12-11 20:55:38 +08:00
William Cheng
53289263d9
Prepare v7.2.0 (#17050)
* update version to 7.2.0-SNAPSHOT

* update samples

* update doc
2023-11-13 18:53:20 +08:00
William Cheng
5e8e2d7f6d
Prepare v7.1.0 in master (#16608)
* prepare v7.1.0 in master

* update
2023-09-18 17:37:36 +08:00
William Cheng
80121aa88f
Prepare v7.0.1 (#16409)
* prepare 7.0.1 in master

* update doc
2023-08-25 16:11:29 +08:00
William Cheng
e69c58623f update samples 2023-08-17 12:03:43 +08:00
AntoineDuComptoirDesPharmacies
85df55b20e
Bugfix #15982 : (#15984)
- Use 'orElse' instead of 'get' to avoid Exception for non required headers
- Update samples
2023-07-04 23:30:21 +08:00
martin-mfg
7e89e1ea81
fix import mapping for return types (#14525) (#15719)
* importContainerType = true

* add unit test

* disable MyImportTest

* build all samples, add import exceptions

* simplify code

* delete myImportTest

* generate docs

* extend comment

* remove inline comment
2023-06-21 15:55:29 +08:00
William Cheng
935146d187 Merge remote-tracking branch 'origin/master' into 7.0.x 2023-04-12 17:51:47 +08:00
William Cheng
5d1e18306a
Prepare 6.6.0-SNAPSHOT (#15100)
* set 6.6.0 snapshot version

* update samples

* update readme
2023-04-01 18:48:01 +08:00
William Cheng
7417432a54
Prepare 6.5.0 release (#15099)
* 6.5.0 release

* update samples
2023-04-01 15:03:35 +08:00
William Cheng
3d4f7b3ce0
[java] fix optional array property's default value (#14961)
* fix optional array property default value

* fix default values

* more fixes

* update default value for jersey2, 3, okhttp-gson

* update default value

* fix java okhttp-gson

* fix jersey2, 3
2023-03-17 11:58:49 +08:00
William Cheng
1beec7ef87 Merge remote-tracking branch 'origin' into 7.0.x 2023-03-03 21:52:50 +08:00
William Cheng
c50a775e0c
prepare 6.5.0 release (#14749) 2023-02-19 20:36:23 +08:00
William Cheng
93df0ff444
Prepare 6.4.0 release (#14748)
* prepare 6.4.0 release

* update samples
2023-02-19 18:53:20 +08:00
William Cheng
31a89e35cb
Prepare 6.4.0 (#14582)
* update to 6.4.0 snapshot

* update samples

* update doc
2023-02-01 22:44:40 +08:00
William Cheng
8f2676c5c2
Prepare v6.3.0 release (#14580)
* 6.3.0 release

* fix maven plugin test

* update samples

* update doc

* fix tests in windows
2023-02-01 20:52:29 +08:00
Nathan Baulch
9f1fa0e440
Fix another batch of spelling typos (#13915)
* Fix typos

* Remove repeated words

* Minor grammar fixes
2022-11-07 21:30:24 +08:00
William Cheng
558ae9373d Merge remote-tracking branch 'origin/master' into 7.0.x 2022-11-01 21:01:06 +08:00
William Cheng
2947d147b4 Merge remote-tracking branch 'origin/master' into 6.3.x 2022-11-01 17:42:59 +08:00
William Cheng
b0ce532bdc
Prepare 6.2.1 release (#13871)
* prepare 6.2.1 release

* revert change

* fix maven plugin test

* update meta
2022-11-01 17:16:46 +08:00
Thibault Duperron
1b65ef38f5
Update dependecies for CVE (#13834)
* Update dependecies for CVE

fix #13772

* Fix schemas
2022-10-31 10:55:11 +08:00
William Cheng
4d03c9272b prepare 6.3.0 snapshot 2022-10-15 15:40:47 +08:00
William Cheng
ac7ebf67dd
Prepare 6.2.1 (#13517)
* update to 6.2.1-SNAPSHOT

* update samples

* update doc
2022-09-25 00:10:30 +08:00
William Cheng
24f476a381
prepare 6.2.0 release (#13514)
* set release version to 6.2.0

* update samples

* comment out rust server test in travis
2022-09-24 21:44:42 +08:00
William Cheng
928070c57a
Prepare 6.1.1 SNAPSHOT version (#13399)
* prepare v6.1.1

* update samples

* update doc
2022-09-11 19:08:23 +08:00
William Cheng
43dbb5ff9c
6.1.0 release (#13398) 2022-09-11 17:16:07 +08:00
William Cheng
c54b0623b8 prepare 7.0.x 2022-05-26 13:17:52 +08:00
William Cheng
5bd94b8fa0 prepare 6.1.x 2022-05-26 12:58:25 +08:00
William Cheng
36a9cf394d
update samples (#12466) 2022-05-26 12:13:59 +08:00
William Cheng
69f79fb789
Prepare 6.0.0 release (#12463)
* prepare 6.0.0 release

* update samples

* update meta codegen
2022-05-26 10:28:01 +08:00
bflamand
575b6b4330
Playframework oauth small upgrade (#12332)
* 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>
2022-05-11 15:19:59 +08:00
William Cheng
ad3b5f7045
[Inline model resolver] various improvements (#12293)
* better handling of requestbody in the inline resolver

* remove commented code

* better request body naming

* fix unique naming

* minor code format change

* removed additional underscore from names, fix test

* more fixes, update tests

* fix all tests

* undo changes to default codegen

* update samples

* update python tests

* add new files

* update samples
2022-05-10 17:13:57 +08:00
William Cheng
2d4a01aa70 Revert "Prepare 6.0.0 beta release (#12039)"
This reverts commit 914b539eea7097ad2b4323d20c8f95144782cb68.
2022-04-04 12:17:12 +08:00
William Cheng
914b539eea
Prepare 6.0.0 beta release (#12039)
* update to 6.0.0-beta

* update samples
2022-04-04 10:29:49 +08:00
Jean-François Côté
48aae8eb4b
Fix NPE when passing null in a formData that is not required. (#12028) 2022-04-02 12:09:27 +08:00
William Cheng
5d8b80a5cd
[Java] rename x-contentType to x-content-type (#11895)
* rename x-contentType to x-content-type

* undo changes
2022-03-18 09:50:42 +08:00
Jean-François Côté
7bda4734e6
Fix sonarqube warnings / code smells from the generated code. (#11702) 2022-02-24 11:07:19 +08:00
cachescrubber
194b3fda26
[Bug][Java/Spring] OAS3 related bugfixes and enhancements (#11526)
* 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
2022-02-05 17:29:58 +08:00
William Cheng
c8b84c4d03 Merge remote-tracking branch 'origin/master' into 6.0.x 2022-01-30 18:01:35 +08:00
William Cheng
33bce99b8e
Avoid using import mapping in model generation (#11217)
* 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
2022-01-16 23:57:53 +08:00
William Cheng
d17a472b89 Merge remote-tracking branch 'origin/master' into 6.0.x 2022-01-03 18:03:00 +08:00
bflamand
5152f8dee0
Java playframework: add support for oauth2 accesstoken validation (#10901)
* 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>
2022-01-02 20:45:33 +08:00
William Cheng
12e03b1937 Merge remote-tracking branch 'origin/master' into 6.0.x 2022-01-02 15:41:37 +08:00
Justin Black
ac55ac9d55
Samples and docs regenerated (#11194) 2021-12-28 11:39:13 -08:00
William Cheng
6269a9810c
Prepare 5.3.1 release (#11161)
* prepare v5.3.1 release

* update samples
2021-12-21 18:20:13 +08:00
Justin Black
cee5f75912
Feat adds content and header properties to CodegenResponse (#11046)
* Adds responseHeaders to codegenResponse

* Sets response headers in codegenResponse

* Samples updated

* Adds test of response headers

* Adds content to CodegenResponse

* Sets codegenResponse content

* Tests added, test content-data.yaml spec update

* Adds mediaTypeSchemaSuffix input to getContent

* Tests updated

* Updates how response content schema names are set

* Adds missing Locale to String.format invocations
2021-12-10 13:49:29 -08:00
William Cheng
378465702c
Prepare v5.3.1 in the master (#10681)
* prepare v5.3.1

* update doc

* update readme
2021-10-25 01:16:07 +08:00
William Cheng
0357b80f19 Merge remote-tracking branch 'origin/master' into 6.0.x 2021-09-01 14:16:17 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos (#10272) 2021-08-28 22:58:24 +08:00
William Cheng
05e4c3cf64 update samples 2021-07-12 17:15:22 +08:00