-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
feat: add optional getters for nullable fields #24039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
bde43b4
0cb169d
16d08a3
8a9121b
5e85ed2
7a25329
f1c6dde
ecbb9cb
e32abbb
eb831e9
5e30ce3
37ccc89
ddc8cfe
c524f59
6d82076
e8f55a6
fbd92e3
bb6082b
4e1abb8
0d2f1de
c1832f7
cc5a645
dcd811b
a2c8be7
bb7840f
4784547
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 |
| 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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,7 +56,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl | |
| |generateBuilders|Whether to generate builders for models| |false| | ||
| |generateClientAsBean|For resttemplate, restclient and webclient, configure whether to create `ApiClient.java` and Apis clients as bean (with `@Component` annotation).| |false| | ||
| |generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false| | ||
| |generateInsecureTlsHook|Generate the ApiClient.disableCertificateValidation hook, which trusts all TLS certificates (default to true). Set to false to omit it, e.g. when static analysis flags the trust-all TrustManager it contains. Available on `jersey2`, `jersey3` libraries.| |true| | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This doc row is auto-generated by Prompt for AI agents |
||
| |gradleProperties|Append additional Gradle properties to the gradle.properties file| |null| | ||
| |groupId|groupId in generated pom.xml| |org.openapitools| | ||
| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false| | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: This removes the documentation row for the
libraryoption, butlibraryis still a registered, supported config option in ElixirClientCodegen (enum tesla/req, default tesla). Leaving a valid option undocumented misleads users and the row will be regenerated anyway by export_docs_generators.sh, which emits all cliOptions. Keep the row, or update the option description if that was the intent.Prompt for AI agents