64 Commits

Author SHA1 Message Date
William Cheng
4ee0cfa1ad
Update jackson dependencies to newer version (#13634)
* update jackson databind dep

* update java native dep to newer version

* fix build issue due to cached config. add dummy pom
2022-10-07 23:04:27 +08:00
sullis
f1d0724f2a
[java] junit 4.13.2 (#11733) 2022-02-27 13:18:19 +08:00
WILLIAM CHENG
4f2b5ee36d Merge remote-tracking branch 'origin/5.4.x' into 6.0.x 2021-11-01 00:54:44 +08:00
Martin Visser
59d5851797
Fix library generation compatibility with Gradle 7.2 (#10716)
* Make Java libraries compatible with Gradle 7

* Make kotlin-spring compatible with Gradle 7

* Update samples to comply to Gradle 7.2

* Generate samples
2021-10-29 12:36:12 +08:00
William Cheng
0bfa28f844 Merge remote-tracking branch 'origin/master' into 6.0.x 2021-10-06 12:00:02 +08:00
RomainPruvostMHH
1735ab9d27
[Java] Replace Java EE 8 dependencies by Jakarta EE 8 (#10513)
* Migrate javax.annotation:javax.annotation-api to
jakarta.annotation:jakarta.annotation-api:1.3.5

* Migrate javax.annotation:javax.annotation-api to
jakarta.annotation:jakarta.annotation-api:1.3.5 for sbt

* Migrate javax.annotation:javax.annotation-api to
jakarta.annotation:jakarta.annotation-api:1.3.5 for gradle

* Commit samples files after the execution of the command
"generate-samples.sh for configs java and kotlin

* Delete org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec
from the exclusion section of org.jboss.resteasy:resteasy-client in the
resteasy module because jboss-annotations-api_1.2_spec isn't a
transitive dependency

* Migrate javax.validation:validation-api to
jakarta.validation:jakarta.validation-api:2.0.2 for maven

* Migrate javax.validation:validation-api to
jakarta.validation:jakarta.validation-api:2.0.2 for gradle

* Migrate javax.validation:validation-api to
jakarta.validation:jakarta.validation-api:2.0.2 for sbt

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.ws.rs:javax.ws.rs-api to
jakarta.ws.rs:jakarta.ws.rs-api:2.1.6 for maven

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.json.bind:javax.json.bind-api to
jakarta.json.bind:jakarta.json.bind-api:1.0.2 for maven

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.json:javax.json-api to jakarta.json:jakarta.json-api:1.1.6
for maven

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.xml.bind:jaxb-api to
jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 for maven

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.el:el-api to jakarta.el:jakarta.el-api:3.0.3 for maven

* Migrate javax.servlet:servlet-api to
jakarta.servlet:jakarta.servlet-api:4.0.4 for maven

* Delete the property servlet-api-version in pom files because it is
useless

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Migrate javax.activation:activation to
jakarta.activation:jakarta.activation-api:1.2.2 for maven

* Delete javax.activation:activation from the exclusion section of
org.jboss.resteasy:resteasy-client in the resteasy module because
javax.activation:activation isn't a transitive dependency

* Commit samples files after the execution of the command
"generate-samples.sh for configs java, spring, jaxrs and kotlin

* Fix the name of property jakarta.activation-version

* Fix a missing property 'jakarta-annotation-version' in
JavaJaxRS/resteasy/pom.mustache

* generate samples

* Fix version value of jakarta.validation-api artifact in
Java/libraries/rest-assured/pom.mustache

* Fix missing property jakarta-annotation-version in
jaxrs-resteasy/eap/pom.mustache

* generate samples

* Revert changes in sample files after running the command
generate-samples.sh in gitBash

* Fix files in
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8

* Replace the old dependency javax.validation:validation-api by the new
Jakarta EE 8 jakarta.validation:jakarta.validation-api in
openapi-generator-online

Co-authored-by: rpruvost <rpruvost@ITEM-S78402.emea.msad.sopra>
Co-authored-by: rpruvost <romain.pruvost@soprasteria.com>
2021-10-05 09:47:29 +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
b799ca9ee0 Merge remote-tracking branch 'origin/5.3.x' into 6.0.x 2021-07-27 11:52:19 +08:00
William Cheng
56aafe30d9 Merge remote-tracking branch 'origin/master' into 5.3.x 2021-07-27 11:33:35 +08:00
Marcel Stör
c5f5d3dd6a
[Java] Add @javax.annotation.Nonnull to required getters (#9593)
* Add @javax.annotation.Nonnull to required getters

* Add updated samples

* Consider the nullable constraint
2021-07-19 10:48:58 +08:00
Jon Jensen
bd070308d9
[Java][*] Annotate deprecated operations and schemas (#9478)
Refs #3358

Ensure `deprecated` operations are annotated/documented as such on the
generated methods. Libraries updated:
  * [feign]
  * [google-api-client]
  * [microprofile]
  * [okhttp-gson]
  * [resttemplate]
  * [retrofit]
  * [retrofit/play*]
  * [webclient]
  * [vertx]

Ensure `deprecated` schemas are annotated/documented as such on the
generated classes/fields. Libraries updated:
  * [feign]
  * [google-api-client]
  * [jersey2]
  * [microprofile]
  * [native]
  * [okhttp-gson]
  * [rest-assured]
  * [resteasy]
  * [resttemplate]
  * [retrofit*]
  * [webclient]
  * [vertx]

Also fix two minor bugs to get the java sample tests working:

* Fix an invalid jackson-datatype-threetenbp version number in vertx/pom.mustache
* Fix a bad return type in webclient/api_test.mustache when uniqueItems=true

Since this commit updates petstore-with-fake-endpoints-models-for-testing.yaml,
several other samples were updated, but it's just new files to reflect the
deprecated schemas, so there should be no consequential differences.

Relevant bits of the spec:

* https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#user-content-operationdeprecated
* https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#user-content-schemadeprecated
2021-07-19 10:27:03 +08:00
William Cheng
05e4c3cf64 update samples 2021-07-12 17:15:22 +08:00
William Cheng
35f933b27f Merge remote-tracking branch 'origin/5.3.x' into 6.0.x 2021-07-12 17:11:35 +08:00
William Cheng
39fbf53150 create v5.3.0 2021-07-10 00:12:23 +08:00
William Cheng
02835b35bc
Prepare v5.2.1 (#9922)
* bump verions to 5.2.1-SNAPSHOT

* update samples

* update readme

* fix gradle properties
2021-07-09 22:42:31 +08:00
William Cheng
90f7bcd909
Prepare v5.2.0 release (#9920)
* 5.2.0 release

* update samples

* update meta codegen
2021-07-09 17:06:55 +08:00
Jens Fischer
870c1e1894
[Java] [Native] Unify exception messages for async, add the status code (#9825)
* [Java] [Native] Unify exception messages for async, add the status code

The template has two methods for creating API exceptions, and the enhancements from #9169 didn't make it to the async version.

- unify the signatures of the two methods (name, arguments)
- make sure the sync version is not generated with asyncNative
- extract the formatting logic into a common formatExceptionMessage() method
- add the status code to the exception message as well, not just the body
- shortened "call received non-success response" to a more concise "call failed with"

* Treat an empty body the same as a null body

Co-authored-by: Jens Fischer <jens.fischer@vier.ai>
2021-07-05 08:57:40 +08:00
shartte
8a31064028
[Java] Remove JAX-RS dependency from generated java-native client. (#8320) (#9585) 2021-06-18 15:05:55 +08:00
William Cheng
3e58b0908c Merge remote-tracking branch 'origin/5.2.x' into 6.0.x 2021-04-28 18:08:24 +08:00
William Cheng
37eaf70755 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-04-28 17:48:21 +08:00
Moshe Elisha
af992e4b29
[Java] [Native] Add response body to exception message (#9169)
* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"

This reverts commit 56e2b1fb

* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"

This reverts commit 335c304d

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* [Java] [Native] Add response body to exception message

* [Java] [Native] Use default base URI if baseUri param is null

* [Java] [Native] Use default base URI if baseUri param is null
2021-04-16 11:02:56 +08:00
Yuri Orlov
659b00a4f9
use standard constant for UTF8 charset in generated java api clients (#7828) 2021-04-05 20:02:28 +08:00
William Cheng
917b358e27 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-04-01 09:25:19 +08:00
William Cheng
de5651adac
[C#] fix integer enum without format (#9136)
* fix inner enum integer without format

* add line break, update samples

* remove line break

* add line break

* update SHA
2021-03-31 15:11:10 +08:00
William Cheng
a35e9b590c Merge remote-tracking branch 'origin/5.2.x' into 6.0.x 2021-03-30 13:18:35 +08:00
William Cheng
3973d4c831 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-03-30 12:00:41 +08:00
William Cheng
a3072680cd update samples 2021-03-30 11:54:37 +08:00
William Cheng
99ddd6d2f2 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-03-30 11:41:09 +08:00
Jakob
0af45b3823
[Java] add jackson annotations to setters (#9041)
* [Java] add jackson annotations to setters

Closes #6856

* [Java] fix conflictiong setter with JsonNullable
2021-03-30 11:17:15 +08:00
William Cheng
a078b1d826 Merge branch '5.2.x' into 6.0.x 2021-03-29 12:56:33 +08:00
William Cheng
16b141e402 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-03-26 10:20:36 +08:00
Florian Kamella
03be3c612d
Fix default value generation for composed schemas in AbstractJavaCodegen (#8918) 2021-03-24 00:36:54 +08:00
William Cheng
d438d797da
[C#][netcore] Fix model, property name check (#9049)
* fix model, property name check in c# generator

* remove file

* remove file

* specify name
2021-03-23 20:00:26 +08:00
William Cheng
95d356ab6b Merge remote-tracking branch 'origin/5.2.x' into 6.0.x 2021-03-21 01:10:46 +08:00
William Cheng
47483e60cb update version to 5.2.0-SNAPSHOT, update samples 2021-03-21 00:10:10 +08:00
William Cheng
0dc62e8b79
Prepare v5.1.1 in the master (#9027)
* Prepare v5.1.1 in the master

* move dart dio next to configs/other
2021-03-20 23:05:11 +08:00
William Cheng
e023eaa821
Prepare v5.1.0 release (#9017)
* prepare v5.1.0 release

* update samples (dart-dio-next)
2021-03-20 16:45:05 +08:00
Thomas Hervé
a1392305f1
Skip examples on complex body in Java (#8887)
* Skip examples on complex body in Java

This removes complex examples in Java which would not result in valid
code.

* Warn example being skip
2021-03-16 10:09:03 +08:00
William Cheng
3909505c5b Merge remote-tracking branch 'origin/master' into 6.0.x 2021-03-13 23:26:43 +08:00
Tyler Ballast
f5151de9fc
Add whitespace to SDK documentation where necessary (#8919)
* Add a space between table title and the line above it to resolve issues when translating markdown to asciidoc

* Regenerate Samples

Co-authored-by: Tyler Ballast <tyler.ballast@reportix.com>
Co-authored-by: tballast <tyler.ballast@gmail.com>
2021-03-08 21:40:54 +08:00
William Cheng
d96197bcbd Merge remote-tracking branch 'origin/master' into 6.0.x 2021-03-03 16:19:20 +08:00
Oleh Kurpiak
135c8f45a4
[Java][native] extend native ApiClient (#8557) 2021-02-16 21:47:44 +08:00
Moshe Elisha
90e8dcf3e3
[JAVA][native] - Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed (#8554)
* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"

This reverts commit 56e2b1fb

* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"

This reverts commit 335c304d

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed
2021-02-12 23:02:13 +08:00
William Cheng
b4f4d7434b Merge remote-tracking branch 'origin/master' into 6.0.x 2021-02-12 18:48:20 +08:00
Reinhard-PTV
6fdd8ea3da
Fixed serialization of date-time query parameters. (#8616) 2021-02-08 23:03:29 +08:00
Reinhard-PTV
df107e2244
Do not use context timezone. (#8614) 2021-02-08 19:25:58 +08:00
William Cheng
52065cc1c5 Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-01-18 12:40:31 +08:00
William Cheng
53a5bfecfd Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-18 11:33:57 +08:00
Toby Murray
99144252f7
Migrate off deprecate Gradle configurations (#8436)
A bunch of gradle configurations have been deprecated, with drop in replacements. Relevant to this project:

compile -> implementation
testCompile -> testImplementation

They're visible by executing e.g. ./gradlew build --warning-mode all with supporting documentation here: https://docs.gradle.org/6.6.1/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
2021-01-15 22:32:50 +08:00