* Bump Gradle in Java projects from 6.0.1 to 6.7.1
Regular maintenance, 6.0.1 was released November 18th, 2019 and the latest release (November 16th, 2020) is 6.7.1. This updates all the wrapper templatesto the latest version.
* Updated generated Java samples
Generated via `./bin/generate-samples.sh bin/configs/java-*`
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Add basic types imports to generated examples
This adds an extension to include basic types imports to generated Java
examples.
* Make some fixes to example generation
* Generate OffsetDatetime correctly
* Create a useful sample for enums, regenerate samples
* Fix BigDecimal as well
* Adds "useTags" option to all jaxrs code generators (AbstractJAXRSServerCodegen):
- jaxrs-jersey
- jaxrs-spec
- jaxrs-cxf-cdi
- jaxrs-resteasy
- jaxrs-cxf
- jaxrs-cxf-extended
- java-msf4j
- jaxrs-resteasy-eap
* jaxrs-spec
- Changed handling of root paths: e.g "/:", "/{id}:" to simplify code and create a more consistent behaviour
-- old: use tag for classname
-- new: use tag only if useTags is enabled, use "DefaultApi" if not
* @path class level annotation
- for all generators above and the microprofile generator (uses same jaxrs postprocessing)
- extended the "commonPath" to contain more than only the root path if possible
- e.g. "/group1/subgroup1/op1" -> "/group1/subgroup1" is moved to class level annotation
* Issue 7425: Fixed comments that referred to RestTemplate.
* Ran genreate-samples.sh
* Re-ran generate-samples.sh against all configs.
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* use java8 OffsetDateTime for clients
* use java8 OffsetDateTime for clients
* fix javadoc
* add javadoc to JavaTimeFormatter.mustache
* add javadoc to JavaTimeFormatter.mustache
* add javadoc to JavaTimeFormatter.mustache
* Add option to prevent usage of jackson-nullable (#2901)
Add a option for all java client and server to prevent
usage of third party library (jackson-databind-nullable)
which may be forbidden in some company
Add samples for Vertx, Spring MVC, Spring Cloud, Feign and Play
Upgrade dependencies for org.openapitools:jackson-databind-nullable
* Samples - Remove dependency org.openapitools:jackson-databind-nullable (#2901)
* Fix generation of gradle file for vertx (#2901)
* Regenerate samples (#2901)
* Fix documentation and up to date (#2901)
* Fix forgotten regeneration of vertx after dependency integration (#2901)
* Regenerate template after rebase (#2901)
* Use yaml config files introduce in #6509 to manage samples (#2901)
* Regenerate template using the config (#2901)
* Fix bad version during testing generated samples (#2901)
* Regenerate template after fix bad version (#2901)
* Fix merge, allow for set importing on codegen model
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
* [java/resttemplate] Generate valid code if no Authentication implementations present
Take the logic used to decide which instances to add to the authentications map and re-use to not import classes or offer non-functional util methods
* parameterize formParams
fixes#5782
* replace use of ISO8601DateFormat and ISO8601Utils with StdDateFormat
fixes#5779
* add constructor to intialise calendar
* Revert "[java/resttemplate] Generate valid code if no Authentication implementations present"
This reverts commit 6e450907bae1d831a4a8c9b66f6b707424f0a39a.
* Revert "parameterize formParams"
This reverts commit 7a26ce5dd21ce147ed33728cd0091a29175367a4.
* also override single arg parse method to avoid throwing exception
* also override single arg parse method to avoid throwing exception
* update samples
* update samples
* fix jersey1 tests
* fix jersey2 test
* update resteasy dependencies
* fix java jersey2 oas3 tests
* use java8 in springboot-beanvalidation
Co-authored-by: Jon Freedman <jon.freedman@zoho.com>
* Corrects tag for including HttpSignatureAuth in gradle builds
* Updates version of org.tomitribe:tomitribe-http-signatures in
gradle template to match version from maven template
* Updates samples
* [java][jersey2-client] Disable coercion of scalars
* Respect the coercion objectmapper setting in deserializers
* Update jackson in maven plugin to get version that has ALLOW_COERCION_OF_SCALARS
* Mustache template should use invokerPackage tag to generate import
* add JsonSubTypes annotation to handle scenario when OAS name has special characters
* add JsonSubTypes annotation to handle scenario when OAS name has special characters. Add unit test
* run sample scripts
* fix unit test
* run sample scripts
* add minimal openapi document to show issue with special characters and discriminators
* Add 'isClassnameSanitized' tag
* Add 'isClassnameSanitized' tag
* Add 'isClassnameSanitized' tag
* Add 'isClassnameSanitized' tag
* Add 'isClassnameSanitized' tag
* Add 'isClassnameSanitized' tag
* Add unit tests for unmarshaling of discriminators with special characters
* Add unit tests for unmarshaling of discriminators with special characters
* use JsonTypeName
Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Support per-call authentication and JsonNullable in client request bodies
Extensions
----------
Since vertx is an asynchronous/reactive toolkit usage of mutable fields
of `ApiClient` to store authentication prohibits delegation of
authentication from incoming call without recreating the client
everytime (which is prohibitively expensive due to instantiation of objectmapper).
This commit adds a per call authentication override which takes precedence
over the mutable fields so a single client can be safely reused. To ease
usage a simple builder-style auxiliary `AuthInfo` object is provided
providing methods for each specified authentication.
A new configuration option for `ApiClient` has been added: `timeout`. It gets
applied as timeout for the vertx http request.
Fixes
-----
Request bodies have been wrongly serialized using vert.x built-in
objectmapper instead of the embedded instance thus usage of beans with
`JsonNullable` wrapped fields in request bodies led to bad requests.
* update vertx samples
* Client Java Vertx: Add url encode for path parameters.
* update vertx samples
* remove the dead code
Remove the dead code from ApiClient
The code is not used and it contains vulnerability of Log Forgery when it writes unvalidated http header to the log. An attacker could take advantage of this behaviour to forge log entries or inject malicious content into the log.
* update Petstore samples
* whitespace
* set adapterBuilder.client() only if okBuilder was used in retrofit2
* updated the samples
* added field okHttpClient and updated samples
* bug fixed, added exception if okBuilder is null
* added semicolon
* added space, changed Exception to RuntimeException and changed its message
* updated the samples