1508 Commits

Author SHA1 Message Date
William Cheng
70982ddc75 update samples 2021-07-31 21:28:10 +08:00
William Cheng
fcdc9d49f7 update samples 2021-07-27 14:16:55 +08:00
unintended
68d48ea03a
Store uri template attribute for webclient to store in metrics (#9964)
* store URI template attribute for webclient

* generate samples
2021-07-27 14:13:24 +08:00
Oleh Kurpiak
aa4018d09b
[Java] fix nullable arrays when JsonNullable is used (#10012) 2021-07-27 13:57:07 +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
William Cheng
f0ebcd56d1
[Java][resttemplate] better code format (#10033)
* java restemplate: better code format

* update samples
2021-07-25 16:07:04 +08:00
Oleh Kurpiak
9e314d165b
[Java][Server] remove snapshot dependency (#9997) 2021-07-21 22:53:23 +08:00
Jorge Rodríguez Martín
e568376a01
[Java][RestTemplate][WebClient] Templatized query params for metrics and evicts oom (#9871)
* [Java][RestTemplate] Templatized query params for metrics and evicts oom

* [Java][WebClient] Templatized query params for metrics and evicts oom

* [Java][RestTemplate] Templatized query params for metrics and evicts oom

* Update samples

* [Java] Add javadoc

* [Java] Update samples
2021-07-21 17:03:19 +08:00
William Cheng
2e1b028ccd update samples 2021-07-19 11:43:03 +08:00
William Cheng
e263e6acc0
[Java] update test samples (#9972)
* remove new java samples

* java feign, webclient use fake petstore for tests

* update samples
2021-07-19 11:08:44 +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
Guillaume TOURBIER
95a11a7f5d
[Java][WebClient] add ResponseEntity return for webclient (#9327)
* feat: add ResponseEntity return for webclient

fix: #5599

* refactor: merge functions

simplification to avoir duplicated code
2021-06-18 16:03:38 +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
d3baa93a62 update java resteasy samples 2021-06-16 16:02:58 +08:00
Payal Gadura
98ae4ab614
Filter out problem+json mime type from JSON mime types (#9680) 2021-06-11 00:59:22 +08:00
William Cheng
cce0d0a222
update resteasy dependencies (#9729) 2021-06-09 15:43:55 +08:00
William Cheng
cd2ef91dc3
Update logback to 1.2.0 (#9722)
* update logback to 2.1.0

* udpate jax-rs samples
2021-06-09 10:03:17 +08:00
desmese
4f1d8f4699
- added localVar prefix to the contentType variable defined in the api.mustache template in the java resttemplate library (#9568)
- rerun generate-samples.sh and export_docs_generators.sh
2021-05-27 10:24:38 +08:00
William Cheng
08467928de update samples 2021-05-17 18:25:07 +08:00
William Cheng
5e29d61639 Merge remote-tracking branch 'origin/master' into 6.0.x 2021-05-13 18:44:58 +08:00
William Cheng
85ff15ac8a update samples 2021-05-10 19:05:02 +08:00
Guillaume TOURBIER
808c0b03bd
feat: add access to webclient and webclientBuilder (#9329)
* feat: add access to webclient and webclientBuilder

fix: #8602

* docs: add params for webclient & builder
2021-05-10 19:02:36 +08:00
William Cheng
be214dc349 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-05-07 10:15:12 +08:00
William Cheng
560bf7e080
v5.1.1 release (#9421) 2021-05-07 09:57:19 +08:00
William Cheng
5d946289ef
Bump OkHTTP dependency to latest in build.sbt (#9361) 2021-04-28 22:36:29 +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
Toby Murray
83adc064a4
Fixes #9151: Bump OkHTTP dependency to latest (#9353)
In 5.0.1 the generated line in `ApiClient` was:
```
return RequestBody.create(MediaType.parse(contentType), (byte[]) obj);
```
in 5.1.0 it is:
```
return RequestBody.create((byte[]) obj, MediaType.parse(contentType));
```

Looks like this change was introduced in #8969, and requires a more recent version of OkHttp to compile in some (all?) circumstances.
2021-04-28 16:55:12 +08:00
Toby Murray
4f84e86001
Support #9151: Default Java client to Java 8 (#9344)
My understanding of the version 5 release of OpenAPI generator was that Java 7 support was dropped. Currently the Java client defaults to Java 7, Java 8 can be opted in with the `java8` config option. This removes the conditional logic in `build.gradle` around that config option and defaults to Java 8. This is to support #9151, up-to-date dependency versions rely on Java 8 and it's easier if that is the default.

To be clear, this changes behavior - previous default version was Java 7, this changes it to Java 8.
2021-04-27 09:37:14 +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
a35e9b590c Merge remote-tracking branch 'origin/5.2.x' into 6.0.x 2021-03-30 13:18:35 +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
tomred-net
38b49e77af
fix #8755 [BUG] Java (jersey2) ApiClient debug cannot be enabled (#8756)
* fix #8755 [BUG] Java (jersey2) ApiClient debug cannot be enabled

* fix #8755 updating samples
2021-03-27 10:01:39 +08:00
William Cheng
16b141e402 Merge remote-tracking branch 'origin/master' into 5.2.x 2021-03-26 10:20:36 +08:00
William Cheng
39f0177ede
[Java] Update WebClient dependencies (#8972)
* update webclient dependencies

* update build.gradle
2021-03-22 13:58:04 +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