Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ivm-java openjdk-21.0.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
generatorName: java
outputDir: samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-optional-getters
library: restclient
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/jspecify.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
validateSpec: false
additionalProperties:
artifactId: petstore-restclient-optional-getters
hideGenerationTimestamp: "true"
containerDefaultToNull: "true"
useSpringBoot4: true
useJackson3: true
openApiNullable: false
useJspecify: true
optionalGettersForNullableFieldsOnly: "true"
typeMappings:
OffsetDateTime: java.time.Instant
BigDecimal: java.math.BigDecimal
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
generatorName: java
outputDir: samples/client/petstore/java/resttemplate-springBoot4-jackson3-jspecify-optional-getters
library: resttemplate
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/jspecify.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
validateSpec: false
additionalProperties:
artifactId: petstore-resttemplate-optional-getters
hideGenerationTimestamp: "true"
containerDefaultToNull: "true"
useJakartaEe: true
useSpringBoot4: true
useJackson3: true
openApiNullable: false
useJspecify: true
optionalGettersForNullableFieldsOnly: "true"
typeMappings:
OffsetDateTime: java.time.Instant
BigDecimal: java.math.BigDecimal
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
generatorName: java
outputDir: samples/client/petstore/java/webclient-springBoot4-jackson3-jspecify-optional-getters
library: webclient
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/jspecify.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
validateSpec: false
additionalProperties:
artifactId: petstore-webclient-optional-getters
hideGenerationTimestamp: "true"
containerDefaultToNull: "true"
useSpringBoot4: true
useJackson3: true
openApiNullable: false
useJspecify: true
optionalGettersForNullableFieldsOnly: "true"
typeMappings:
OffsetDateTime: java.time.Instant
BigDecimal: java.math.BigDecimal
22 changes: 22 additions & 0 deletions bin/configs/spring-boot-4-jspecify-optional-getters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
generatorName: spring
library: spring-boot
outputDir: samples/openapi3/server/petstore/springboot-4-jspecify-optional-getters
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/jspecify.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
validateSpec: false
additionalProperties:
groupId: org.openapitools.openapi3
documentationProvider: springdoc
interfaceOnly: true
artifactId: springboot-optional-getters
snapshotVersion: "true"
useSpringBoot4: true
useJackson3: true
useBeanValidation: true
withXml: true
hideGenerationTimestamp: "true"
generateConstructorWithAllArgs: true
generateBuilders: true
openApiNullable: false
useJspecify: true
optionalGettersForNullableFieldsOnly: "true"
1 change: 1 addition & 0 deletions docs/generators/groovy.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-camel.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalAcceptNullable|Use `ofNullable` instead of just `of` to accept null values when using Optional.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-dubbo.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-helidon-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.client.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|rootJavaEEPackage|Root package name for Java EE| |Helidon 2.x and earlier: javax; Helidon 3.x and later: jakarta|
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-helidon-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.server.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|performBeanValidation|Perform BeanValidation| |false|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|rootJavaEEPackage|Root package name for Java EE| |Helidon 2.x and earlier: javax; Helidon 3.x and later: jakarta|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-inflector.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-micronaut-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Outdated
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-micronaut-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|micronautVersion|Micronaut version, only >=3.0.0 versions are supported| |3.4.3|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-microprofile.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null|
|modelPackage|package for generated models| |org.openapitools.client.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-msf4j.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-pkmst.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |com.prokarma.pkmst.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-play-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |apimodels|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-undertow-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |null|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-vertx-web.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.vertxweb.server.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-vertx.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.server.api.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java-wiremock.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |null|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Outdated
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
1 change: 1 addition & 0 deletions docs/generators/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|microprofileRestClientVersion|Version of MicroProfile Rest Client API.| |null|
|modelPackage|package for generated models| |org.openapitools.client.model|
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|optionalGettersForNullableFieldsOnly|Make getters of nullable / non-required fields return Optional<T> while keeping the field and setter as the raw type. Opt-in, disabled by default.| |false|
|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false|
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
Expand Down
Loading
Loading