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
* [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>
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.
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.
* 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