Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
59c67f2
Merge pull request #4 from OpenAPITools/master
jpfinne May 11, 2026
784da69
Merge branch 'OpenAPITools:master' into master
jpfinne May 12, 2026
9ee6075
Merge branch 'OpenAPITools:master' into master
jpfinne May 14, 2026
91ce7ba
Merge branch 'OpenAPITools:master' into master
jpfinne May 15, 2026
0808d0e
Merge branch 'OpenAPITools:master' into master
jpfinne May 17, 2026
46d9c9c
Merge branch 'OpenAPITools:master' into master
jpfinne May 18, 2026
7b6cf90
Merge branch 'OpenAPITools:master' into master
jpfinne May 30, 2026
b50a337
Merge branch 'OpenAPITools:master' into master
jpfinne Jun 1, 2026
ae1bff7
Merge branch 'OpenAPITools:master' into master
jpfinne Jun 2, 2026
5229d8d
Merge branch 'OpenAPITools:master' into master
jpfinne Jun 3, 2026
cdc74eb
Merge branch 'OpenAPITools:master' into master
jpfinne Jun 13, 2026
df30bd2
Merge branch 'OpenAPITools:master' into master
jpfinne Jul 4, 2026
246b21d
Merge branch 'OpenAPITools:master' into master
jpfinne Jul 8, 2026
8e39563
Merge branch 'OpenAPITools:master' into master
jpfinne Aug 1, 2026
9fdd676
Jspecify improvement
jpfinne Aug 1, 2026
8bcd7ea
Handling of openapiNullable and useOptional
jpfinne Aug 2, 2026
7e2aba7
Regenerate java client (jspecify.yaml updated)
jpfinne Aug 2, 2026
9875949
Regenerate java client (jspecify.yaml updated)
jpfinne Aug 2, 2026
e0e3d6f
Regenerate java client (jspecify.yaml updated)
jpfinne Aug 2, 2026
6e09b1c
fix Case of nullableDataTypeWithEnum
jpfinne Aug 2, 2026
58578cc
fix Case of nullableDatatypeWithEnum
jpfinne Aug 2, 2026
54ffb35
fix toIndentedString
jpfinne Aug 2, 2026
8e86fce
Fix FILES for generate clients
jpfinne Aug 2, 2026
d722f1a
Regenerate samples
jpfinne Aug 2, 2026
249e902
Fix filename of spring-boot-4-jspecify
jpfinne Aug 2, 2026
d3b338d
Fix folder of springboot-4-jspecify
jpfinne Aug 2, 2026
3f3a174
Add assertion for optionalAcceptNullable=true/false
jpfinne Aug 3, 2026
2dd81fd
Add Jspecify in builder of java clients
jpfinne Aug 4, 2026
0d1019c
Fix @Nullable to toIndentedString
jpfinne Aug 4, 2026
fb8e2a1
Remove tests from FILES
jpfinne Aug 4, 2026
a61e0ce
Force rebuild
jpfinne Aug 4, 2026
c7cbd25
force rebuild
jpfinne Aug 4, 2026
34a1819
Regenerate restClients with generateConstructorWithAllArgs
jpfinne Aug 4, 2026
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
3 changes: 3 additions & 0 deletions .github/workflows/samples-java-client-jdk17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- samples/client/petstore/java/apache-httpclient-jackson3/**
- samples/client/petstore/java/native-jackson3-jspecify/**
- samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/**
- samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/**
- samples/client/others/java/webclient-sealedInterface/**
- samples/client/others/java/webclient-sealedInterface_3_1/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
Expand All @@ -30,6 +31,7 @@ on:
- samples/client/petstore/java/apache-httpclient-jackson3/**
- samples/client/petstore/java/native-jackson3-jspecify/**
- samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify/**
- samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable/**
- samples/client/others/java/webclient-sealedInterface/**
- samples/client/others/java/webclient-sealedInterface_3_1/**
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
Expand Down Expand Up @@ -57,6 +59,7 @@ jobs:
- samples/client/petstore/java/restclient-springBoot4-jackson2
- samples/client/petstore/java/restclient-springBoot4-jackson3
- samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify
- samples/client/petstore/java/restclient-springBoot4-jackson3-jspecify-openapiNullable
- samples/client/petstore/java/native-jackson3-jspecify
- samples/client/petstore/java/restclient-swagger2
- samples/client/petstore/java/restclient-useSingleRequestParameter
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/samples-spring-jdk17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- samples/openapi3/server/petstore/springboot-3/**
- samples/openapi3/server/petstore/springboot-4/**
- samples/openapi3/server/petstore/springboot-4-jspecify/**
- samples/openapi3/server/petstore/springboot-4-jspecify-openapiNullable/**
- samples/openapi3/server/petstore/springboot-4-jspecify-useOptional/**
- samples/server/petstore/springboot-api-response-examples/**
- samples/server/petstore/springboot-lombok-data/**
- samples/server/petstore/springboot-lombok-tostring/**
Expand All @@ -27,6 +29,8 @@ on:
- samples/openapi3/server/petstore/springboot-3/**
- samples/openapi3/server/petstore/springboot-4/**
- samples/openapi3/server/petstore/springboot-4-jspecify/**
- samples/openapi3/server/petstore/springboot-4-jspecify-openapiNullable/**
- samples/openapi3/server/petstore/springboot-4-jspecify-useOptional/**
- samples/server/petstore/springboot-api-response-examples/**
- samples/server/petstore/springboot-lombok-data/**
- samples/server/petstore/springboot-lombok-tostring/**
Expand All @@ -53,6 +57,8 @@ jobs:
- samples/openapi3/server/petstore/springboot-3
- samples/openapi3/server/petstore/springboot-4
- samples/openapi3/server/petstore/springboot-4-jspecify
- samples/openapi3/server/petstore/springboot-4-jspecify-openapiNullable
- samples/openapi3/server/petstore/springboot-4-jspecify-useOptional
- samples/server/petstore/springboot-api-response-examples
- samples/server/petstore/springboot-lombok-data
- samples/server/petstore/springboot-lombok-tostring
Expand Down
4 changes: 2 additions & 2 deletions bin/configs/java-native-jackson3-jspecify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ validateSpec: false
additionalProperties:
artifactId: petstore-native-jackson3
hideGenerationTimestamp: "true"
generateBuilders: true
useReflectionEqualsHashCode: "true"
useJackson3: "true"
openApiNullable: "false"
useJspecify: true
generateBuilders: true
typeMappings:
OffsetDateTime: java.time.Instant
BigDecimal: java.math.BigDecimal
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/restclient-springBoot4-jackson3-jspecify-openapiNullable
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
hideGenerationTimestamp: "true"
containerDefaultToNull: "true"
useSpringBoot4: true
useJackson3: true
openApiNullable: true
useJspecify: true
generateBuilders: true
generateConstructorWithAllArgs: true
typeMappings:
OffsetDateTime: java.time.Instant
BigDecimal: java.math.BigDecimal
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ additionalProperties:
useJackson3: true
openApiNullable: false
useJspecify: true
generateBuilders: true
generateConstructorWithAllArgs: true
typeMappings:
OffsetDateTime: java.time.Instant
BigDecimal: java.math.BigDecimal
1 change: 0 additions & 1 deletion bin/configs/java-resttemplate-springBoot4-jackson2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ additionalProperties:
containerDefaultToNull: "true"
useJakartaEe: true
useSpringBoot4: true

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ additionalProperties:
useJackson3: true
openApiNullable: false
useJspecify: true
generateBuilders: true
typeMappings:
OffsetDateTime: java.time.Instant
BigDecimal: java.math.BigDecimal
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ additionalProperties:
useJackson3: true
openApiNullable: false
useJspecify: true
generateBuilders: true
typeMappings:
OffsetDateTime: java.time.Instant
BigDecimal: java.math.BigDecimal
24 changes: 24 additions & 0 deletions bin/configs/spring-boot-4-jspecify-openapiNullable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
generatorName: spring
library: spring-boot
outputDir: samples/openapi3/server/petstore/springboot-4-jspecify-openapiNullable
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
snapshotVersion: "true"
useSpringBoot4: true
useJackson3: true
useBeanValidation: true
withXml: true
hideGenerationTimestamp: "true"
generateConstructorWithAllArgs: true
generateBuilders: true
openApiNullable: true
useJspecify: true
typeMappings:
OffsetDateTime: java.time.Instant
BigDecimal: java.math.BigDecimal
25 changes: 25 additions & 0 deletions bin/configs/spring-boot-4-jspecify-useOptional.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
generatorName: spring
library: spring-boot
outputDir: samples/openapi3/server/petstore/springboot-4-jspecify-useOptional
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
snapshotVersion: "true"
useSpringBoot4: true
useJackson3: true
useBeanValidation: true
withXml: true
hideGenerationTimestamp: "true"
generateConstructorWithAllArgs: true
generateBuilders: true
useOptional: true
optionalAcceptNullable: true
useJspecify: true
typeMappings:
OffsetDateTime: java.time.Instant
BigDecimal: java.math.BigDecimal
5 changes: 4 additions & 1 deletion bin/configs/spring-boot-4-jspecify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ additionalProperties:
generateConstructorWithAllArgs: true
generateBuilders: true
openApiNullable: false
useJspecify: true
useJspecify: true
typeMappings:
OffsetDateTime: java.time.Instant
BigDecimal: java.math.BigDecimal
Original file line number Diff line number Diff line change
Expand Up @@ -2866,7 +2866,7 @@ protected ImmutableMap.Builder<String, Mustache.Lambda> addMustacheLambdas() {
Mustache.Lambda jSpecifyDatatypeLambda = (fragment, writer) -> {
String dataType = fragment.execute();
if (jSpecifyNullableLambda.isSetAndClear()) {
int idx = dataType.lastIndexOf('.');
int idx = getLastIndex(dataType);
if (idx > 0) {
// generate declaration like java.time.@Nullable Timestamp
writer.write(dataType.substring(0, idx + 1));
Expand All @@ -2886,6 +2886,14 @@ protected ImmutableMap.Builder<String, Mustache.Lambda> addMustacheLambdas() {

}

private int getLastIndex(String dataType) {
int index = dataType.indexOf('<');
if (index >= 0) {
dataType = dataType.substring(0, index);
}
return dataType.lastIndexOf('.');
}

/**
* for Jspecify, remove @Nullable before the datatype and set keptNullable to true if done.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par
}

{{#vars}}
public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) {
public {{classname}}.Builder {{name}}({{>nullableArgument_builder}} {{name}}) {
{{#vendorExtensions.x-is-jackson-optional-nullable}}
this.instance.{{name}} = JsonNullable.<{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}>of({{name}});
{{/vendorExtensions.x-is-jackson-optional-nullable}}
Expand All @@ -32,7 +32,7 @@ public static class Builder {{#parentModel}}extends {{classname}}.Builder {{/par
{{/vars}}

{{#parentVars}}
public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) { // inherited: {{isInherited}}
public {{classname}}.Builder {{name}}({{>nullableArgument_builder}} {{name}}) { // inherited: {{isInherited}}
super.{{name}}({{name}});
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) {
private{{#jsonb}} static{{/jsonb}} String toIndentedString({{#useJspecify}}@Nullable {{/useJspecify}}Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}
{{#supportUrlQuery}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
private String toIndentedString({{#useJspecify}}@Nullable {{/useJspecify}}Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
private String toIndentedString({{#useJspecify}}@Nullable {{/useJspecify}}Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
private String toIndentedString({{#useJspecify}}@Nullable {{/useJspecify}}Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}
{{#supportUrlQuery}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
private String toIndentedString({{#useJspecify}}@Nullable {{/useJspecify}}Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#v
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) {
private{{#jsonb}} static{{/jsonb}} String toIndentedString({{#useJspecify}}@Nullable {{/useJspecify}}Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}
{{#supportUrlQuery}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) {
private{{#jsonb}} static{{/jsonb}} String toIndentedString({{#useJspecify}}@Nullable {{/useJspecify}}Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}
{{#supportUrlQuery}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public {{>sealed}}class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#v
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) {
private{{#jsonb}} static{{/jsonb}} String toIndentedString({{#useJspecify}}@Nullable {{/useJspecify}}Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}
{{#supportUrlQuery}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{#lambda.trim}}{{>nullable_var_annotations}} {{#lambda.jSpecifyDatatype}}{{{datatypeWithEnum}}}{{/lambda.jSpecifyDatatype}}{{/lambda.trim}}
{{#lambda.trim}}{{>nullable_var_annotations}} {{>nullableDatatypeWithEnum}}{{/lambda.trim}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{#useJspecify}}{{#lambda.jSpecifyNullable}}{{^required}}@{{javaxPackage}}.annotation.Nullable{{/required}}{{/lambda.jSpecifyNullable}}{{#lambda.jSpecifyDatatype}}{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}{{/lambda.jSpecifyDatatype}}{{/useJspecify}}{{^useJspecify}}{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}{{/useJspecify}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{#lambda.jSpecifyNullable}}{{#required}}{{#isNullable}}@{{javaxPackage}}.annotation.Nullable{{/isNullable}}{{^useJspecify}}{{^isNullable}}@{{javaxPackage}}.annotation.Nonnull{{/isNullable}}{{/useJspecify}}{{/required}}{{^required}}@{{javaxPackage}}.annotation.Nullable{{/required}}{{/lambda.jSpecifyNullable}}
{{^useJspecify}}{{#required}}{{#isNullable}}@{{javaxPackage}}.annotation.Nullable{{/isNullable}}{{^isNullable}}@{{javaxPackage}}.annotation.Nonnull{{/isNullable}}{{/required}}{{^required}}@{{javaxPackage}}.annotation.Nullable{{/required}}{{/useJspecify}}{{#useJspecify}}{{#lambda.jSpecifyNullable}}{{^required}}@{{javaxPackage}}.annotation.Nullable{{/required}}{{/lambda.jSpecifyNullable}}{{/useJspecify}}
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private{{#jsonb}} static{{/jsonb}} String toIndentedString(Object o) {
private{{#jsonb}} static{{/jsonb}} String toIndentedString({{#useJspecify}}@Nullable {{/useJspecify}}Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}
{{#supportUrlQuery}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{{#deprecated}}
@Deprecated
{{/deprecated}}
public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) {
public {{classname}}.Builder {{name}}({{>nullableArgument_builder}} {{name}}) {
this.instance.{{name}}({{name}});
return this;
}
Expand All @@ -37,7 +37,7 @@
{{/vars}}
{{#parentVars}}
@Override
public {{classname}}.Builder {{name}}({{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}} {{name}}) {
public {{classname}}.Builder {{name}}({{>nullableArgument_builder}} {{name}}) {
this.instance.{{name}}({{name}});
return this;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{#lambda.jSpecifyNullable}}{{^required}}{{^defaultValue}}{{^useOptional}}{{#openApiNullable}}{{^isNullable}}@Nullable {{/isNullable}}{{/openApiNullable}}{{^openApiNullable}}@Nullable {{/openApiNullable}}{{/useOptional}}{{/defaultValue}}{{#defaultValue}}{{^openApiNullable}}{{#isNullable}}@Nullable {{/isNullable}}{{/openApiNullable}}{{/defaultValue}}{{/required}}{{/lambda.jSpecifyNullable}}
{{#paramName}}{{>nullableAnnotation_default}}{{/paramName}}{{^paramName}}{{>nullableAnnotation_jspecify}}{{^useJspecify}}{{!backward compatibility}}{{>nullableAnnotation_default}}{{/useJspecify}}{{/paramName}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{#lambda.jSpecifyNullable}}{{^required}}{{^defaultValue}}{{^useOptional}}{{#openApiNullable}}{{^isNullable}}@Nullable {{/isNullable}}{{/openApiNullable}}{{^openApiNullable}}@Nullable {{/openApiNullable}}{{/useOptional}}{{/defaultValue}}{{#defaultValue}}{{^openApiNullable}}{{#isNullable}}@Nullable {{/isNullable}}{{/openApiNullable}}{{/defaultValue}}{{/required}}{{/lambda.jSpecifyNullable}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{#useJspecify}}{{#lambda.jSpecifyNullable}}{{^required}}{{^useOptional}}{{#openApiNullable}}{{^isNullable}}@Nullable {{/isNullable}}{{/openApiNullable}}{{^openApiNullable}}@Nullable {{/openApiNullable}}{{/useOptional}}{{/required}}{{/lambda.jSpecifyNullable}}{{/useJspecify}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{#useJspecify}}{{^required}}{{#lambda.jSpecifyNullable}}{{^useOptional}}@Nullable {{/useOptional}}{{#useOptional}}{{#optionalAcceptNullable}}@Nullable {{/optionalAcceptNullable}}{{/useOptional}}{{/lambda.jSpecifyNullable}}{{/required}}{{#lambda.jSpecifyDatatype}}{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}{{/lambda.jSpecifyDatatype}}{{/useJspecify}}{{^useJspecify}}{{#removeAnnotations}}{{{datatypeWithEnum}}}{{/removeAnnotations}}{{/useJspecify}}
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}
/**
* Constructor with all args parameters
*/
public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{>nullableAnnotation}}{{{datatypeWithEnum}}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) {
public {{classname}}({{#vendorExtensions.x-java-all-args-constructor-vars}}{{#useJspecify}}{{#lambda.jSpecifyNullable}}{{^required}}@Nullable {{/required}}{{/lambda.jSpecifyNullable}}{{#lambda.jSpecifyDatatype}}{{{datatypeWithEnum}}}{{/lambda.jSpecifyDatatype}}{{/useJspecify}}{{^useJspecify}}{{>nullableAnnotation}}{{{datatypeWithEnum}}}{{/useJspecify}} {{name}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-java-all-args-constructor-vars}}) {
{{#parent}}
super({{#parentVars}}{{name}}{{^-last}}, {{/-last}}{{/parentVars}});
{{/parent}}
Expand All @@ -153,7 +153,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}
{{^lombok.Data}}

{{! begin feature: fluent setter methods }}
public {{classname}} {{name}}({{>nullableAnnotation}}{{{datatypeWithEnum}}} {{name}}) {
public {{classname}} {{name}}({{#useJspecify}}{{#lambda.jSpecifyNullable}}{{^required}}{{^useOptional}}@Nullable {{/useOptional}}{{#useOptional}}{{#optionalAcceptNullable}}@Nullable {{/optionalAcceptNullable}}{{/useOptional}}{{/required}}{{/lambda.jSpecifyNullable}}{{#lambda.jSpecifyDatatype}}{{{datatypeWithEnum}}}{{/lambda.jSpecifyDatatype}}{{/useJspecify}}{{^useJspecify}}{{>nullableAnnotation_default}}{{{datatypeWithEnum}}}{{/useJspecify}} {{name}}) {
{{#openApiNullable}}
this.{{name}} = {{#isNullable}}JsonNullable.of({{/isNullable}}{{#useOptional}}{{^required}}{{^isNullable}}{{^isContainer}}Optional.of{{#optionalAcceptNullable}}Nullable{{/optionalAcceptNullable}}({{/isContainer}}{{/isNullable}}{{/required}}{{/useOptional}}{{name}}{{#isNullable}}){{/isNullable}}{{#useOptional}}{{^required}}{{^isNullable}}{{^isContainer}}){{/isContainer}}{{/isNullable}}{{/required}}{{/useOptional}};
{{/openApiNullable}}
Expand Down Expand Up @@ -348,7 +348,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString({{>nullableAnnotation}}Object o) {
private String toIndentedString(@Nullable Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}
{{/lombok.ToString}}
Expand Down
Loading
Loading