Skip to content

Commit b9f6fe6

Browse files
authored
[Java] [Microprofile] Add Json-B polymorphism type info annotations (#20164)
* [Microprofile] Add Json-B polymorphism annotations * [Microprofile] Set openApiNullable in configs to false * [Microprofile] Bump JSON Bind version to 3.0 * [Microprofile] Only apply JSON-B polymorphism for MP 3.0 * Update samples * [Microprofile] Update documentation/configs for openApiNullable * Update docs
1 parent 06f0b68 commit b9f6fe6

File tree

572 files changed

+38137
-525
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

572 files changed

+38137
-525
lines changed

bin/configs/java-microprofile-rest-client-3.0-jackson.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
generatorName: java
22
outputDir: samples/client/petstore/java/microprofile-rest-client-3.0-jackson
33
library: microprofile
4-
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
55
templateDir: modules/openapi-generator/src/main/resources/Java
66
additionalProperties:
77
serializationLibrary: jackson

bin/configs/java-microprofile-rest-client-3.0.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
generatorName: java
22
outputDir: samples/client/petstore/java/microprofile-rest-client-3.0
33
library: microprofile
4-
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
55
templateDir: modules/openapi-generator/src/main/resources/Java
66
additionalProperties:
77
artifactId: microprofile-rest-client-3

bin/configs/java-microprofile-rest-client.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
generatorName: java
22
outputDir: samples/client/petstore/java/microprofile-rest-client
33
library: microprofile
4-
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
55
templateDir: modules/openapi-generator/src/main/resources/Java
66
additionalProperties:
77
artifactId: microprofile-rest-client

docs/generators/groovy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5252
|licenseName|The name of the license| |Unlicense|
5353
|licenseUrl|The URL of the license| |http://unlicense.org|
5454
|modelPackage|package for generated models| |org.openapitools.model|
55-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
55+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
5656
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
5757
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
5858
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-camel.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
7272
|licenseName|The name of the license| |Unlicense|
7373
|licenseUrl|The URL of the license| |http://unlicense.org|
7474
|modelPackage|package for generated models| |org.openapitools.model|
75-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
75+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
7676
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
7777
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
7878
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-helidon-client.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5353
|licenseName|The name of the license| |Unlicense|
5454
|licenseUrl|The URL of the license| |http://unlicense.org|
5555
|modelPackage|package for generated models| |org.openapitools.client.model|
56-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
56+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
5757
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
5858
|rootJavaEEPackage|Root package name for Java EE| |Helidon 2.x and earlier: javax; Helidon 3.x and later: jakarta|
5959
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|

docs/generators/java-helidon-server.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5353
|licenseName|The name of the license| |Unlicense|
5454
|licenseUrl|The URL of the license| |http://unlicense.org|
5555
|modelPackage|package for generated models| |org.openapitools.server.model|
56-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
56+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
5757
|performBeanValidation|Perform BeanValidation| |false|
5858
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
5959
|rootJavaEEPackage|Root package name for Java EE| |Helidon 2.x and earlier: javax; Helidon 3.x and later: jakarta|

docs/generators/java-inflector.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5454
|licenseName|The name of the license| |Unlicense|
5555
|licenseUrl|The URL of the license| |http://unlicense.org|
5656
|modelPackage|package for generated models| |org.openapitools.model|
57-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
57+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
5858
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
5959
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6060
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-micronaut-client.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
6666
|licenseUrl|The URL of the license| |http://unlicense.org|
6767
|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3|
6868
|modelPackage|package for generated models| |org.openapitools.model|
69-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
69+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
7070
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
7171
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
7272
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-micronaut-server.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
6464
|licenseUrl|The URL of the license| |http://unlicense.org|
6565
|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3|
6666
|modelPackage|package for generated models| |org.openapitools.model|
67-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
67+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
6868
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6969
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
7070
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-microprofile.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
6969
|microprofileMutiny|Whether to use async types for microprofile (currently only Smallrye Mutiny is supported).| |null|
7070
|microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null|
7171
|modelPackage|package for generated models| |org.openapitools.client.model|
72-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
72+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
7373
|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false|
7474
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
7575
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-msf4j.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5656
|licenseName|The name of the license| |Unlicense|
5757
|licenseUrl|The URL of the license| |http://unlicense.org|
5858
|modelPackage|package for generated models| |org.openapitools.model|
59-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
59+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
6060
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6161
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6262
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-pkmst.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5656
|licenseName|The name of the license| |Unlicense|
5757
|licenseUrl|The URL of the license| |http://unlicense.org|
5858
|modelPackage|package for generated models| |com.prokarma.pkmst.model|
59-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
59+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
6060
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6161
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6262
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-play-framework.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5858
|licenseName|The name of the license| |Unlicense|
5959
|licenseUrl|The URL of the license| |http://unlicense.org|
6060
|modelPackage|package for generated models| |apimodels|
61-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
61+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
6262
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6363
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6464
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-undertow-server.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5454
|licenseName|The name of the license| |Unlicense|
5555
|licenseUrl|The URL of the license| |http://unlicense.org|
5656
|modelPackage|package for generated models| |null|
57-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
57+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
5858
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
5959
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6060
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-vertx-web.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5454
|licenseName|The name of the license| |Unlicense|
5555
|licenseUrl|The URL of the license| |http://unlicense.org|
5656
|modelPackage|package for generated models| |org.openapitools.vertxweb.server.model|
57-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
57+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
5858
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
5959
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6060
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-vertx.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5454
|licenseName|The name of the license| |Unlicense|
5555
|licenseUrl|The URL of the license| |http://unlicense.org|
5656
|modelPackage|package for generated models| |org.openapitools.server.api.model|
57-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
57+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
5858
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
5959
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6060
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-wiremock.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5454
|licenseName|The name of the license| |Unlicense|
5555
|licenseUrl|The URL of the license| |http://unlicense.org|
5656
|modelPackage|package for generated models| |null|
57-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
57+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
5858
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
5959
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6060
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
6969
|microprofileMutiny|Whether to use async types for microprofile (currently only Smallrye Mutiny is supported).| |null|
7070
|microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null|
7171
|modelPackage|package for generated models| |org.openapitools.client.model|
72-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
72+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
7373
|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false|
7474
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
7575
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/jaxrs-cxf-cdi.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5858
|licenseName|The name of the license| |Unlicense|
5959
|licenseUrl|The URL of the license| |http://unlicense.org|
6060
|modelPackage|package for generated models| |org.openapitools.model|
61-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
61+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
6262
|openApiSpecFileLocation|Location where the file containing the spec will be generated in the output folder. No file generated when set to null or empty string.| |null|
6363
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6464
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/jaxrs-cxf-client.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5454
|licenseName|The name of the license| |Unlicense|
5555
|licenseUrl|The URL of the license| |http://unlicense.org|
5656
|modelPackage|package for generated models| |org.openapitools.model|
57-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
57+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
5858
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
5959
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6060
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/jaxrs-cxf-extended.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
6262
|licenseUrl|The URL of the license| |http://unlicense.org|
6363
|loadTestDataFromFile|Load test data from a generated JSON file| |false|
6464
|modelPackage|package for generated models| |org.openapitools.model|
65-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
65+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
6666
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6767
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6868
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/jaxrs-cxf.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
6060
|licenseName|The name of the license| |Unlicense|
6161
|licenseUrl|The URL of the license| |http://unlicense.org|
6262
|modelPackage|package for generated models| |org.openapitools.model|
63-
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
63+
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
6464
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6565
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
6666
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

0 commit comments

Comments
 (0)