diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index 2242386b9b42..ddd6079a6f8d 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -48,6 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 21fc99f69821..5a2f6053ee1e 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -67,6 +67,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**spring-boot**
Spring-boot Server application.
**spring-cloud**
Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
**spring-http-interface**
Spring 6 HTTP interfaces (testing)
|spring-boot| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/java-helidon-client.md b/docs/generators/java-helidon-client.md index 8891de60a0d0..7d027fedaf6b 100644 --- a/docs/generators/java-helidon-client.md +++ b/docs/generators/java-helidon-client.md @@ -48,6 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.client| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template) to use|
**mp**
Helidon MP Client
**se**
Helidon SE Client
|mp| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/java-helidon-server.md b/docs/generators/java-helidon-server.md index f46a9eda3f3f..191a3cb23323 100644 --- a/docs/generators/java-helidon-server.md +++ b/docs/generators/java-helidon-server.md @@ -48,6 +48,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.server| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template) to use|
**mp**
Helidon MP Server
**se**
Helidon SE Server
|se| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 210db1efcb9a..912891fdb9e5 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -50,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.controllers| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index 4640a166ac1d..274bab5972b3 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -61,6 +61,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index 4817892b446b..00eab7af4f63 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -59,6 +59,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-microprofile.md b/docs/generators/java-microprofile.md index 682705bb613e..d73e35fbdc2b 100644 --- a/docs/generators/java-microprofile.md +++ b/docs/generators/java-microprofile.md @@ -61,6 +61,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.client| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template) to use|
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1
**jersey3**
HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1
**feign**
HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1
**feign-hc5**
HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit2**
HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
**resttemplate**
HTTP client: Spring RestTemplate 5.3.33 (6.1.5 if `useJakartaEe=true`). JSON processing: Jackson 2.17.1
**webclient**
HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1
**restclient**
HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1
**resteasy**
HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1
**vertx**
HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1
**google-api-client**
HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1
**rest-assured**
HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1. Only for Java11+
**microprofile**
HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1
**apache-httpclient**
HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1
|okhttp-gson| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 7ed5179526b2..dc0121895e07 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -51,6 +51,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**jersey2**
Jersey core 2.x
|jersey2| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 789e58062aef..d0584bd3fb05 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -52,6 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |com.prokarma.pkmst.controller| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index c14d28f8f101..5ef7dac931da 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -54,6 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 18e29ce40f5b..75e7a237b468 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -50,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.handler| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index c95a7e65c6a0..e57280015c0d 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -50,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.vertxweb.server| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index 8093e9fea525..095dc43663f5 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -50,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java-wiremock.md b/docs/generators/java-wiremock.md index c13cd11f5a87..988427d115ff 100644 --- a/docs/generators/java-wiremock.md +++ b/docs/generators/java-wiremock.md @@ -50,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/java.md b/docs/generators/java.md index 097a06411c59..10ad52df10fd 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -61,6 +61,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.client| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template) to use|
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1
**jersey3**
HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1
**feign**
HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1
**feign-hc5**
HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit2**
HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
**resttemplate**
HTTP client: Spring RestTemplate 5.3.33 (6.1.5 if `useJakartaEe=true`). JSON processing: Jackson 2.17.1
**webclient**
HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1
**restclient**
HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1
**resteasy**
HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1
**vertx**
HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1
**google-api-client**
HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1
**rest-assured**
HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1. Only for Java11+
**microprofile**
HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1
**apache-httpclient**
HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1
|okhttp-gson| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 0d8d492cf7ad..a77d850d5a92 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -53,6 +53,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**<default>**
JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
**quarkus**
Server using Quarkus
**thorntail**
Server using Thorntail
**openliberty**
Server using Open Liberty
**helidon**
Server using Helidon
**kumuluzee**
Server using KumuluzEE
|<default>| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 29a7923078b0..bf4dba6864d7 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -50,6 +50,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index 34e21c850e25..bd19da7a48d3 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -57,6 +57,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index ed011e27f2a7..4323807ee807 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -56,6 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 0e5ac8c87c61..415e15042950 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -51,6 +51,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**jersey2**
Jersey core 2.x
**jersey3**
Jersey core 3.x
|jersey2| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 149173bf40ad..50be62cf8789 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -52,6 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index f4ab7ca6dbb5..dbbe313b7834 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -52,6 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeaders|Skip header parameters in the generated API methods using @ApiImplicitParams annotation.| |false| |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 559e9aca5b8a..2bea87cb95ee 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -54,6 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**<default>**
JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)
**quarkus**
Server using Quarkus
**thorntail**
Server using Thorntail
**openliberty**
Server using Open Liberty
**helidon**
Server using Helidon
**kumuluzee**
Server using KumuluzEE
|<default>| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index fe41ea1f32a6..8a9d388edfde 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -60,6 +60,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| |invokerPackage|root package for generated code| |org.openapitools.api| +|jackson|Enable Jackson annotation as serialization library.| |false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| |library|library template (sub-template)|
**spring-boot**
Spring-boot Server application.
**spring-cloud**
Spring-Cloud-Feign client with Spring-Boot auto-configured settings.
**spring-http-interface**
Spring 6 HTTP interfaces (testing)
|spring-boot| |licenseName|The name of the license| |Unlicense| diff --git a/modules/openapi-generator-maven-plugin/src/it/jaxrs-cxf-client-issue5077/invoker.properties b/modules/openapi-generator-maven-plugin/src/it/jaxrs-cxf-client-issue5077/invoker.properties new file mode 100644 index 000000000000..7ca0a57da2ad --- /dev/null +++ b/modules/openapi-generator-maven-plugin/src/it/jaxrs-cxf-client-issue5077/invoker.properties @@ -0,0 +1,3 @@ +invoker.goals = -nsu clean generate-sources +# The expected result of the build, possible values are "success" (default) and "failure" +invoker.buildResult = success diff --git a/modules/openapi-generator-maven-plugin/src/it/jaxrs-cxf-client-issue5077/pom.xml b/modules/openapi-generator-maven-plugin/src/it/jaxrs-cxf-client-issue5077/pom.xml new file mode 100644 index 000000000000..72e9a6c93e18 --- /dev/null +++ b/modules/openapi-generator-maven-plugin/src/it/jaxrs-cxf-client-issue5077/pom.xml @@ -0,0 +1,66 @@ + + + + + 4.0.0 + + org.openapitools.maven.its + jaxrs-cxf-client-issue5077 + 1.0-SNAPSHOT + + + true + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.0 + + 11 + 11 + + + + @project.groupId@ + @project.artifactId@ + @project.version@ + + https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml + jaxrs-cxf-client + java8 + ${basedir}/out + + true + + + + + remote + generate-sources + + generate + + + + + + + diff --git a/modules/openapi-generator-maven-plugin/src/it/jaxrs-cxf-client-issue5077/verify.groovy b/modules/openapi-generator-maven-plugin/src/it/jaxrs-cxf-client-issue5077/verify.groovy new file mode 100644 index 000000000000..f55d51f4c359 --- /dev/null +++ b/modules/openapi-generator-maven-plugin/src/it/jaxrs-cxf-client-issue5077/verify.groovy @@ -0,0 +1,25 @@ +/* + * Copyright 2022 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +File mavenPomXml = new File(basedir, "out/pom.xml") +assert mavenPomXml.isFile() + +File petModel = new File(basedir, "out/src/gen/java/org/openapitools/model/Pet.java") +assert petModel.isFile() +assert petModel.text.contains("import com.fasterxml.jackson.annotation.JsonCreator;") +assert petModel.text.contains("import com.fasterxml.jackson.annotation.JsonValue;") +assert petModel.text.contains("@JsonCreator") +assert petModel.text.contains("@JsonValue") diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 66175b1b9543..b16b33eefef1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -317,6 +317,7 @@ public AbstractJavaCodegen() { cliOptions.add(CliOption.newBoolean(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC, this.isHideGenerationTimestamp())); cliOptions.add(CliOption.newBoolean(WITH_XML, "whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)")); cliOptions.add(CliOption.newBoolean(USE_ONE_OF_INTERFACES, "whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface")); + cliOptions.add(CliOption.newBoolean(JACKSON, "Enable Jackson annotation as serialization library.")); CliOption dateLibrary = new CliOption(DATE_LIBRARY, "Option. Date library to use").defaultValue(this.getDateLibrary()); Map dateOptions = new HashMap<>();