The two "required" policies are supplied by the caller since the spring and kotlin-spring generators
+ * apply slightly different matrices there: kotlin-spring's non-nullable Kotlin types can never hold null,
+ * so it always uses {@code ALWAYS} for required properties, whereas spring uses {@code NON_NULL} for
+ * required-non-nullable (contract protection) and {@code ALWAYS} for required-nullable.
+ *
+ * @param model the model owning {@code property}, whose imports may be extended
+ * @param property the property to resolve the policy for
+ * @param generateJsonIncludeAnnotations the resolved {@code generateJsonIncludeAnnotations} state
+ * @param optionalNonNullPropertyJsonInclude the resolved {@code optionalNonNullPropertyJsonInclude} policy
+ * @param requiredNonNullablePolicy the policy to apply to required, non-nullable properties
+ * @param requiredNullablePolicy the policy to apply to required, nullable properties
+ */
+ public static void resolveJsonIncludePolicy(CodegenModel model, CodegenProperty property,
+ TriStateBoolean generateJsonIncludeAnnotations, JsonIncludePolicy optionalNonNullPropertyJsonInclude,
+ JsonIncludePolicy requiredNonNullablePolicy, JsonIncludePolicy requiredNullablePolicy) {
+ if (property.vendorExtensions.containsKey(VendorExtension.X_JACKSON_JSON_INCLUDE_POLICY.getName())) {
+ String manualPolicy = resolveManualJsonIncludePolicy(
+ property.vendorExtensions.get(VendorExtension.X_JACKSON_JSON_INCLUDE_POLICY.getName()), VendorExtension.X_JACKSON_JSON_INCLUDE_POLICY.getName());
+ if (manualPolicy != null) {
+ property.vendorExtensions.put(VendorExtension.X_JACKSON_JSON_INCLUDE_POLICY.getName(), manualPolicy);
+ model.imports.add("JsonInclude");
+ } else {
+ // NONE / empty means "emit nothing"; drop the extension so the template renders no annotation.
+ property.vendorExtensions.remove(VendorExtension.X_JACKSON_JSON_INCLUDE_POLICY.getName());
+ }
+ return;
+ }
+ if (!generateJsonIncludeAnnotations.isTrue()) {
+ return;
+ }
+ JsonIncludePolicy policy = null;
+ if (property.required) {
+ policy = property.isNullable ? requiredNullablePolicy : requiredNonNullablePolicy;
+ } else if (!property.isNullable) {
+ policy = optionalNonNullPropertyJsonInclude;
+ }
+ if (policy != null && policy.isEmitted()) {
+ property.vendorExtensions.put(VendorExtension.X_JACKSON_JSON_INCLUDE_POLICY.getName(), policy.name());
+ model.imports.add("JsonInclude");
+ }
+ }
+
+ /**
+ * Resolve which {@code @JsonSetter(nulls = ...)} annotation, if any, should be emitted for an optional,
+ * non-nullable property.
+ *
+ * @param generateJsonSetterNullsAnnotations the resolved {@code generateJsonSetterNullsAnnotations} state
+ * @param required whether the property is required
+ * @param nullable whether the property is nullable
+ * @param openApiNullable whether the generator's {@code openApiNullable} option is enabled
+ * @param failModeSupported whether this generator supports {@link JsonSetterNullsMode#FAIL} (kotlin-spring
+ * does; spring currently only ever emits {@link JsonSetterNullsMode#SKIP})
+ * @return {@link JsonSetterNullsMode#NONE} unless the property is optional and non-nullable and
+ * {@code generateJsonSetterNullsAnnotations} is explicitly enabled; otherwise {@link JsonSetterNullsMode#FAIL}
+ * when {@code openApiNullable && failModeSupported}, {@link JsonSetterNullsMode#SKIP} when
+ * {@code !openApiNullable}, or {@link JsonSetterNullsMode#NONE} when {@code openApiNullable && !failModeSupported}.
+ */
+ public static JsonSetterNullsMode resolveJsonSetterNullsMode(TriStateBoolean generateJsonSetterNullsAnnotations,
+ boolean required, boolean nullable, boolean openApiNullable, boolean failModeSupported) {
+ if (!generateJsonSetterNullsAnnotations.isTrue() || required || nullable) {
+ return JsonSetterNullsMode.NONE;
+ }
+ if (openApiNullable) {
+ return failModeSupported ? JsonSetterNullsMode.FAIL : JsonSetterNullsMode.NONE;
+ }
+ return JsonSetterNullsMode.SKIP;
+ }
+}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonIncludePolicy.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonIncludePolicy.java
new file mode 100644
index 000000000000..6c10f3f92b10
--- /dev/null
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/JsonIncludePolicy.java
@@ -0,0 +1,80 @@
+package org.openapitools.codegen.utils;
+
+import lombok.Getter;
+
+import java.util.EnumSet;
+import java.util.Locale;
+import java.util.Set;
+
+/**
+ * Mirrors {@code com.fasterxml.jackson.annotation.JsonInclude.Include} (the set of policies a
+ * generated {@code @JsonInclude} annotation can be given), plus a {@link #NONE} sentinel meaning
+ * "emit no {@code @JsonInclude} annotation at all", used by the {@code spring} and
+ * {@code kotlin-spring} generators (issue #24401) for:
+ *
+ *
OPTIONAL_NON_NULL_POLICIES =
+ EnumSet.of(NON_NULL, NON_EMPTY, NON_DEFAULT, NONE);
+
+ /** Whether this policy should result in an emitted {@code @JsonInclude} annotation. */
+ public boolean isEmitted() {
+ return this != NONE;
+ }
+
+ /** Whether this policy is a valid value for the {@code optionalNonNullPropertyJsonInclude} config option. */
+ public boolean isValidOptionalNonNullPolicy() {
+ return OPTIONAL_NON_NULL_POLICIES.contains(this);
+ }
+
+ /**
+ * Parse a raw string (trimmed, case-insensitive) into a {@link JsonIncludePolicy}, or return
+ * {@code null} if blank/whitespace-only (callers treat that the same as {@link #NONE}).
+ *
+ * @throws IllegalArgumentException if non-blank but not a valid {@link JsonIncludePolicy} name
+ */
+ public static JsonIncludePolicy parse(Object rawPolicy) {
+ if (rawPolicy == null) {
+ return null;
+ }
+ String trimmed = rawPolicy.toString().trim();
+ if (trimmed.isEmpty()) {
+ return null;
+ }
+ return JsonIncludePolicy.valueOf(trimmed.toUpperCase(Locale.ROOT));
+ }
+}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/TriStateBoolean.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/TriStateBoolean.java
new file mode 100644
index 000000000000..c8a07567c0dd
--- /dev/null
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/TriStateBoolean.java
@@ -0,0 +1,44 @@
+package org.openapitools.codegen.utils;
+
+/**
+ * A tri-state toggle for boolean-like config options that need to distinguish "the user never set
+ * this" from an explicit {@code true}/{@code false}, e.g. so a weak default can be applied along
+ * with a one-time warning when the option was left unset, while an explicit {@code false} silently
+ * keeps the same default behavior.
+ *
+ * This replaces the previous convention of using a boxed {@code Boolean} field where
+ * {@code null} meant "unset", which requires a code comment at every declaration site to be
+ * understandable.
+ */
+public enum TriStateBoolean {
+ /** The option was never explicitly set by the user (neither {@code true} nor {@code false}). */
+ UNSET,
+ /** The option was explicitly set to {@code false}. */
+ FALSE,
+ /** The option was explicitly set to {@code true}. */
+ TRUE;
+
+ /** Whether this state represents an explicit, affirmative opt-in ({@link #TRUE}). */
+ public boolean isTrue() {
+ return this == TRUE;
+ }
+
+ /** Whether the option was never explicitly set ({@link #UNSET}). */
+ public boolean isUnset() {
+ return this == UNSET;
+ }
+
+ /**
+ * Convert a nullable {@link Boolean} (the CLI/config-option convention where {@code null} means
+ * "not present in additionalProperties") into a {@link TriStateBoolean}.
+ *
+ * @param value {@code null} for unset, {@code Boolean.TRUE}/{@code Boolean.FALSE} for an explicit value
+ * @return {@link #UNSET}, {@link #TRUE}, or {@link #FALSE}
+ */
+ public static TriStateBoolean fromNullableBoolean(Boolean value) {
+ if (value == null) {
+ return UNSET;
+ }
+ return value ? TRUE : FALSE;
+ }
+}
diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache
index 6dd2e6da00d2..b7f28efc82e9 100644
--- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache
+++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache
@@ -62,14 +62,12 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}
{{{.}}}
{{/vendorExtensions.x-field-extra-annotation}}
{{#jackson}}
- {{^required}}
- {{^isNullable}}
- @JsonInclude(JsonInclude.Include.NON_NULL)
- {{/isNullable}}
- {{/required}}
- {{#vendorExtensions.x-is-jackson-optional-nullable}}
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
- {{/vendorExtensions.x-is-jackson-optional-nullable}}
+ {{#vendorExtensions.x-jackson-json-include-policy}}
+ @JsonInclude(JsonInclude.Include.{{{vendorExtensions.x-jackson-json-include-policy}}})
+ {{/vendorExtensions.x-jackson-json-include-policy}}
+ {{#vendorExtensions.x-has-json-setter-nulls-skip}}
+ @JsonSetter(nulls = Nulls.SKIP)
+ {{/vendorExtensions.x-has-json-setter-nulls-skip}}
{{/jackson}}
{{#deprecated}}
@Deprecated
@@ -252,11 +250,6 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}}
{{#vendorExtensions.x-setter-extra-annotation}}
{{{vendorExtensions.x-setter-extra-annotation}}}
{{/vendorExtensions.x-setter-extra-annotation}}
- {{#jackson}}
- {{#vendorExtensions.x-has-json-setter-nulls-skip}}
- @JsonSetter(nulls = Nulls.SKIP)
- {{/vendorExtensions.x-has-json-setter-nulls-skip}}
- {{/jackson}}
{{#deprecated}}
@Deprecated
{{/deprecated}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache
index 900c2e3f4662..78380ea41ac9 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassOptVar.mustache
@@ -2,9 +2,8 @@
@Schema({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}
@ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}{{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}{{#deprecated}}
@Deprecated(message = ""){{/deprecated}}{{#vendorExtensions.x-field-extra-annotation}}
- {{{.}}}{{/vendorExtensions.x-field-extra-annotation}}{{^isNullable}}
- @field:JsonInclude(JsonInclude.Include.NON_NULL){{/isNullable}}{{#vendorExtensions.x-is-jackson-optional-nullable}}
- @field:JsonInclude(JsonInclude.Include.NON_ABSENT){{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-has-json-setter-nulls-skip}}
+ {{{.}}}{{/vendorExtensions.x-field-extra-annotation}}{{#vendorExtensions.x-jackson-json-include-policy}}
+ @field:JsonInclude(JsonInclude.Include.{{{vendorExtensions.x-jackson-json-include-policy}}}){{/vendorExtensions.x-jackson-json-include-policy}}{{#vendorExtensions.x-has-json-setter-nulls-skip}}
@field:JsonSetter(nulls = Nulls.SKIP){{/vendorExtensions.x-has-json-setter-nulls-skip}}{{#vendorExtensions.x-has-json-setter-nulls-fail}}
@field:JsonSetter(nulls = Nulls.FAIL){{/vendorExtensions.x-has-json-setter-nulls-fail}}
@param:JsonProperty("{{{baseName}}}")
diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache
index 2f07705c6dd0..e299d4582a3c 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-spring/dataClassReqVar.mustache
@@ -1,6 +1,7 @@
{{#useBeanValidation}}{{>beanValidation}}{{>beanValidationModel}}{{/useBeanValidation}}{{#swagger2AnnotationLibrary}}
@Schema({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}
@ApiModelProperty({{#example}}example = "{{#lambdaRemoveLineBreak}}{{#lambdaEscapeInNormalString}}{{{.}}}{{/lambdaEscapeInNormalString}}{{/lambdaRemoveLineBreak}}", {{/example}}required = true, {{#isReadOnly}}readOnly = {{{isReadOnly}}}, {{/isReadOnly}}value = "{{{description}}}"){{/swagger1AnnotationLibrary}}{{#vendorExtensions.x-field-extra-annotation}}
- {{{.}}}{{/vendorExtensions.x-field-extra-annotation}}
+ {{{.}}}{{/vendorExtensions.x-field-extra-annotation}}{{#vendorExtensions.x-jackson-json-include-policy}}
+ @field:JsonInclude(JsonInclude.Include.{{{vendorExtensions.x-jackson-json-include-policy}}}){{/vendorExtensions.x-jackson-json-include-policy}}
@param:JsonProperty("{{{baseName}}}")
@get:JsonProperty("{{{baseName}}}", required = true){{#isInherited}} override{{/isInherited}} {{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isArray}}{{baseType}}<{{/isArray}}{{classname}}.{{{nameInPascalCase}}}{{#isArray}}>{{/isArray}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}{{#defaultValue}} = {{^isNumber}}{{{defaultValue}}}{{/isNumber}}{{#isNumber}}{{{dataType}}}("{{{defaultValue}}}"){{/isNumber}}{{/defaultValue}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
index 2193ee5c9f9f..42ea848788da 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java
@@ -8294,57 +8294,333 @@ void issue24003() throws IOException {
}
/**
- * Scenario 4 (openApiNullable=true): optional+nullable field must carry
- * {@code @JsonInclude(JsonInclude.Include.NON_ABSENT)} so that Jackson
- * excludes {@code JsonNullable.undefined()} from serialized output.
+ * Issue #24401: the {@code @JsonInclude(NON_ABSENT)} annotation must no longer be emitted for
+ * {@code JsonNullable} fields, as the JsonNullable module already governs their inclusion.
*/
@Test
- void optionalNullableField_withOpenApiNullable_hasNonAbsentAnnotation() throws IOException {
+ void optionalNullableField_withOpenApiNullable_hasNoJsonIncludeAnnotation() throws IOException {
Map files = generateFromContract(
"src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
SPRING_BOOT,
Map.of(CodegenConstants.OPENAPI_NULLABLE, "true"));
Path modelFile = files.get("TestModel.java").toPath();
- // NON_ABSENT must be present — only optionalNullable (JsonNullable) gets this annotation
- assertFileContains(modelFile, "@JsonInclude(JsonInclude.Include.NON_ABSENT)");
- // JsonNullable field must be present
- assertFileContains(modelFile, "private JsonNullable optionalNullable");
- // NON_NULL must also be present (for optionalNonNullable fields)
- assertFileContains(modelFile, "@JsonInclude(JsonInclude.Include.NON_NULL)");
- assertFileContains(modelFile, "import com.fasterxml.jackson.annotation.JsonInclude");
+ assertFileNotContains(modelFile, "@JsonInclude(JsonInclude.Include.NON_ABSENT)");
+ JavaFileAssert.assertThat(files.get("TestModel.java"))
+ .assertProperty("optionalNullable").withType("JsonNullable")
+ .assertPropertyAnnotations().doesNotContainWithName("JsonInclude");
}
/**
- * Without openApiNullable the optional+nullable field is a plain nullable type —
- * no {@code @JsonInclude(NON_ABSENT)} should be emitted.
+ * Issue #24401 (safe-but-noisy): with no flags set, the generator defaults to weak/7.23.0 behavior —
+ * NO policy {@code @JsonInclude} or {@code @JsonSetter(nulls)} annotations are emitted, deferring
+ * entirely to the global ObjectMapper.
*/
@Test
- void optionalNullableField_withoutOpenApiNullable_hasNoNonAbsentAnnotation() throws IOException {
+ void jsonInclude_unset_emitsNoPolicyAnnotations() throws IOException {
Map files = generateFromContract(
"src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
SPRING_BOOT,
- Map.of(CodegenConstants.OPENAPI_NULLABLE, "false"));
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "true"));
Path modelFile = files.get("TestModel.java").toPath();
- // Without openApiNullable the field is String optionalNullable, not JsonNullable
- assertFileNotContains(modelFile, "@JsonInclude(JsonInclude.Include.NON_ABSENT)");
+ assertFileNotContains(modelFile, "@JsonInclude(");
+ assertFileNotContains(modelFile, "@JsonSetter(");
}
/**
- * Optional+non-nullable fields must still have {@code @JsonInclude(NON_NULL)} regardless
- * of the openApiNullable setting.
+ * Issue #24401: default matrix for JAVA-SPRING when {@code generateJsonIncludeAnnotations=true}
+ * (openApiNullable=true). required non-nullable -> NON_NULL, required nullable -> ALWAYS,
+ * optional non-nullable -> NON_NULL (default policy), optional nullable -> no annotation.
*/
@Test
- void optionalNonNullableField_alwaysHasNonNullAnnotation() throws IOException {
+ void jsonInclude_defaultMatrix() throws IOException {
Map files = generateFromContract(
"src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
SPRING_BOOT,
- Map.of(CodegenConstants.OPENAPI_NULLABLE, "true"));
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "true",
+ CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true"));
+
+ JavaFileAssert.assertThat(files.get("TestModel.java"))
+ .assertProperty("requiredNonNullable").assertPropertyAnnotations()
+ .containsWithNameAndAttributes("JsonInclude", Map.of("value", "JsonInclude.Include.NON_NULL")).toProperty().toType()
+ .assertProperty("requiredNullable").assertPropertyAnnotations()
+ .containsWithNameAndAttributes("JsonInclude", Map.of("value", "JsonInclude.Include.ALWAYS")).toProperty().toType()
+ .assertProperty("optionalNonNullable").assertPropertyAnnotations()
+ .containsWithNameAndAttributes("JsonInclude", Map.of("value", "JsonInclude.Include.NON_NULL")).toProperty().toType()
+ .assertProperty("optionalNullable").assertPropertyAnnotations()
+ .doesNotContainWithName("JsonInclude");
+ }
+
+ /**
+ * Issue #24401 (safe-but-noisy): {@code generateJsonSetterNullsAnnotations=true} emits
+ * {@code @JsonSetter(nulls = Nulls.SKIP)} on optional non-nullable fields (openApiNullable=false);
+ * leaving it unset emits none.
+ */
+ @Test
+ void jsonSetterNulls_generateFlag_controlsEmission() throws IOException {
+ Map withFlag = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "false",
+ CodegenConstants.GENERATE_JSON_SETTER_NULLS_ANNOTATIONS, "true"));
+ assertFileContains(withFlag.get("OptionalNonNullable.java").toPath(), "@JsonSetter(nulls = Nulls.SKIP)");
+
+ Map unset = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "false"));
+ assertFileNotContains(unset.get("OptionalNonNullable.java").toPath(), "@JsonSetter(");
+ }
+
+ /**
+ * Issue #24401 regression: when Lombok generates the setter ({@code lombok.Setter}), the manual
+ * setter method (and the {@code @JsonSetter} annotation that used to live only on it) is skipped
+ * entirely. {@code @JsonSetter(nulls = Nulls.SKIP)} must be emitted on the field itself so it is
+ * still honored by Jackson even though no explicit setter method is generated.
+ */
+ @Test
+ void jsonSetterNulls_generateFlag_appliesWithLombokSetter() throws IOException {
+ Map additionalProperties = new HashMap<>();
+ additionalProperties.put(CodegenConstants.OPENAPI_NULLABLE, "false");
+ additionalProperties.put(CodegenConstants.GENERATE_JSON_SETTER_NULLS_ANNOTATIONS, "true");
+ additionalProperties.put(AbstractJavaCodegen.ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "@lombok.Getter;@lombok.Setter");
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ SPRING_BOOT,
+ additionalProperties);
+
+ JavaFileAssert.assertThat(files.get("OptionalNonNullable.java"))
+ .hasNoMethod("setOptionalNonNullable");
+ assertFileContains(files.get("OptionalNonNullable.java").toPath(), "@JsonSetter(nulls = Nulls.SKIP)");
+ }
+
+ /**
+ * Issue #24401: {@code optionalNonNullPropertyJsonInclude} changes the policy emitted for
+ * optional non-nullable properties (when {@code generateJsonIncludeAnnotations=true}).
+ */
+ @Test
+ void jsonInclude_optionalNonNullPolicy_nonEmpty() throws IOException {
+ Map files = generateFromContract(
+ "src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "true",
+ CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true",
+ CodegenConstants.OPTIONAL_NON_NULL_PROPERTY_JSON_INCLUDE, "NON_EMPTY"));
+
+ JavaFileAssert.assertThat(files.get("TestModel.java"))
+ .assertProperty("optionalNonNullable").assertPropertyAnnotations()
+ .containsWithNameAndAttributes("JsonInclude", Map.of("value", "JsonInclude.Include.NON_EMPTY")).toProperty().toType()
+ // required-field protection is unaffected by the optional policy
+ .assertProperty("requiredNonNullable").assertPropertyAnnotations()
+ .containsWithNameAndAttributes("JsonInclude", Map.of("value", "JsonInclude.Include.NON_NULL"));
+ }
+
+ /**
+ * Issue #24401: {@code optionalNonNullPropertyJsonInclude=NONE} emits no annotation on optional
+ * non-nullable properties, deferring to the global ObjectMapper. Required-field protection stays.
+ */
+ @Test
+ void jsonInclude_optionalNonNullPolicy_none() throws IOException {
+ Map files = generateFromContract(
+ "src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "true",
+ CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true",
+ CodegenConstants.OPTIONAL_NON_NULL_PROPERTY_JSON_INCLUDE, "NONE"));
+
+ JavaFileAssert.assertThat(files.get("TestModel.java"))
+ .assertProperty("optionalNonNullable").assertPropertyAnnotations()
+ .doesNotContainWithName("JsonInclude").toProperty().toType()
+ .assertProperty("requiredNonNullable").assertPropertyAnnotations()
+ .containsWithNameAndAttributes("JsonInclude", Map.of("value", "JsonInclude.Include.NON_NULL"));
+ }
+
+ /**
+ * Issue #24401: {@code generateJsonIncludeAnnotations=false} removes ALL policy @JsonInclude
+ * annotations, including the required-field protection, letting the global ObjectMapper win.
+ */
+ @Test
+ void jsonInclude_generateJsonIncludeAnnotations_false() throws IOException {
+ Map files = generateFromContract(
+ "src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "true",
+ CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "false"));
Path modelFile = files.get("TestModel.java").toPath();
- assertFileContains(modelFile, "@JsonInclude(JsonInclude.Include.NON_NULL)");
- assertFileContains(modelFile, "private String optionalNonNullable");
+ assertFileNotContains(modelFile, "@JsonInclude(");
+ }
+
+ /**
+ * Issue #24401: a manual per-property {@code x-jackson-json-include-policy} vendor extension
+ * always overrides the automatic behavior, even when {@code generateJsonIncludeAnnotations=false}.
+ */
+ @Test
+ void jsonInclude_manualOverride_winsOverGenerateFlag() throws IOException {
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_override.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "false"));
+
+ JavaFileAssert.assertThat(files.get("TestModel.java"))
+ .assertProperty("overridden").assertPropertyAnnotations()
+ .containsWithNameAndAttributes("JsonInclude", Map.of("value", "JsonInclude.Include.NON_EMPTY")).toProperty().toType()
+ // no automatic annotation on the non-overridden optional field
+ .assertProperty("plain").assertPropertyAnnotations()
+ .doesNotContainWithName("JsonInclude");
+ }
+
+ /**
+ * Issue #24401: with one property per schema, each generated model must import exactly the
+ * Jackson annotations its single property needs — no more, no less.
+ */
+ @Test
+ void jsonInclude_perSchemaImports() throws IOException {
+ final String jsonInclude = "com.fasterxml.jackson.annotation.JsonInclude";
+ final String jsonSetter = "com.fasterxml.jackson.annotation.JsonSetter";
+ final String nulls = "com.fasterxml.jackson.annotation.Nulls";
+ final String jsonNullable = "org.openapitools.jackson.nullable.JsonNullable";
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "true",
+ CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true"));
+
+ // required non-nullable -> @JsonInclude(NON_NULL); no setter machinery
+ JavaFileAssert.assertThat(files.get("RequiredNonNullable.java"))
+ .hasImports(jsonInclude).hasNoImports(jsonSetter, nulls);
+ // required nullable -> @JsonInclude(ALWAYS)
+ JavaFileAssert.assertThat(files.get("RequiredNullable.java"))
+ .hasImports(jsonInclude).hasNoImports(jsonSetter, nulls);
+ // optional non-nullable with openApiNullable=true -> @JsonInclude(NON_NULL), no @JsonSetter
+ JavaFileAssert.assertThat(files.get("OptionalNonNullable.java"))
+ .hasImports(jsonInclude).hasNoImports(jsonSetter, nulls);
+ // optional nullable with openApiNullable=true -> JsonNullable, NO @JsonInclude
+ JavaFileAssert.assertThat(files.get("OptionalNullable.java"))
+ .hasImports(jsonNullable).hasNoImports(jsonInclude, jsonSetter, nulls);
+ }
+
+ /**
+ * Issue #24401: with openApiNullable=false, optional non-nullable adds @JsonSetter(Nulls.SKIP);
+ * optional nullable is a plain type needing none of the Jackson import machinery.
+ */
+ @Test
+ void jsonInclude_perSchemaImports_withoutOpenApiNullable() throws IOException {
+ final String jsonInclude = "com.fasterxml.jackson.annotation.JsonInclude";
+ final String jsonSetter = "com.fasterxml.jackson.annotation.JsonSetter";
+ final String nulls = "com.fasterxml.jackson.annotation.Nulls";
+ final String jsonNullable = "org.openapitools.jackson.nullable.JsonNullable";
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "false",
+ CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true",
+ CodegenConstants.GENERATE_JSON_SETTER_NULLS_ANNOTATIONS, "true"));
+
+ // optional non-nullable -> @JsonInclude(NON_NULL) + @JsonSetter(Nulls.SKIP)
+ JavaFileAssert.assertThat(files.get("OptionalNonNullable.java"))
+ .hasImports(jsonInclude, jsonSetter, nulls).hasNoImports(jsonNullable);
+ // optional nullable (plain String) -> no policy annotation, no import machinery
+ JavaFileAssert.assertThat(files.get("OptionalNullable.java"))
+ .hasNoImports(jsonInclude, jsonSetter, nulls, jsonNullable);
+ }
+
+ /**
+ * Issue #24401: even with {@code generateJsonIncludeAnnotations=false}, a manual per-property
+ * vendor extension must still emit its annotation AND the JsonInclude import must be present.
+ */
+ @Test
+ void jsonInclude_manualOverride_emitsImport_whenAnnotationsDisabled() throws IOException {
+ final String jsonInclude = "com.fasterxml.jackson.annotation.JsonInclude";
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "false"));
+
+ JavaFileAssert.assertThat(files.get("ManualOverride.java"))
+ .hasImports(jsonInclude)
+ .assertProperty("value").assertPropertyAnnotations()
+ .containsWithNameAndAttributes("JsonInclude", Map.of("value", "JsonInclude.Include.NON_EMPTY"));
+ // A schema without the override must not import JsonInclude when annotations are disabled
+ JavaFileAssert.assertThat(files.get("OptionalNonNullable.java")).hasNoImports(jsonInclude);
+ }
+
+ /**
+ * Issue #24401: a forced override on an optional+nullable ({@code JsonNullable}) property must be
+ * respected — the annotation is emitted and the JsonInclude import is added, even though the
+ * automatic path emits nothing for JsonNullable fields.
+ */
+ @Test
+ void jsonInclude_forcedOverride_onJsonNullable_emitsAnnotationAndImport() throws IOException {
+ final String jsonInclude = "com.fasterxml.jackson.annotation.JsonInclude";
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "true"));
+
+ JavaFileAssert.assertThat(files.get("ForcedOnJsonNullable.java"))
+ .hasImports(jsonInclude)
+ .assertProperty("value").withType("JsonNullable").assertPropertyAnnotations()
+ .containsWithNameAndAttributes("JsonInclude", Map.of("value", "JsonInclude.Include.NON_NULL"));
+ }
+
+ /**
+ * Issue #24401: a manual per-property override of {@code NONE} means "emit no annotation". Neither the
+ * {@code @JsonInclude} annotation nor its import may be generated, otherwise the output fails to compile.
+ */
+ @Test
+ void jsonInclude_manualOverride_none_emitsNoAnnotationOrImport() throws IOException {
+ final String jsonInclude = "com.fasterxml.jackson.annotation.JsonInclude";
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true"));
+
+ JavaFileAssert.assertThat(files.get("ManualNone.java"))
+ .hasNoImports(jsonInclude)
+ .assertProperty("value").assertPropertyAnnotations()
+ .doesNotContainWithName("JsonInclude");
+ }
+
+ /**
+ * Issue #24401: a whitespace-padded {@code NONE} override must be treated identically to a bare
+ * {@code NONE} — the sentinel comparison must trim before checking, otherwise it falls through to
+ * validation and generation fails for a value that should simply suppress the annotation.
+ */
+ @Test
+ void jsonInclude_manualOverride_paddedNone_emitsNoAnnotationOrImport() throws IOException {
+ final String jsonInclude = "com.fasterxml.jackson.annotation.JsonInclude";
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true"));
+
+ JavaFileAssert.assertThat(files.get("ManualNonePadded.java"))
+ .hasNoImports(jsonInclude)
+ .assertProperty("value").assertPropertyAnnotations()
+ .doesNotContainWithName("JsonInclude");
+ }
+
+ /**
+ * Issue #24401: an invalid manual per-property override must fail fast with an actionable error
+ * during generation rather than emitting uncompilable Java.
+ */
+ @Test
+ void jsonInclude_manualOverride_invalid_failsWithActionableError() {
+ org.assertj.core.api.Assertions.assertThatThrownBy(() -> generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_invalid_override.yaml",
+ SPRING_BOOT,
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true")))
+ .hasStackTraceContaining("x-jackson-json-include-policy")
+ .hasStackTraceContaining("NOT_A_REAL_POLICY");
}
@Test
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java
index e8d9e69d1468..5f912aab61cc 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java
@@ -6629,7 +6629,8 @@ public void requiredNullable_scenario2_requiredNullable() throws IOException {
public void requiredNullable_scenario3_optionalNonNullable() throws IOException {
Map files = generateFromContract(
"src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
- new HashMap<>());
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true",
+ CodegenConstants.GENERATE_JSON_SETTER_NULLS_ANNOTATIONS, "true"));
Path modelFile = files.get("TestModel.kt").toPath();
String content = Files.readString(modelFile);
@@ -6659,7 +6660,9 @@ public void requiredNullable_scenario3_optionalNonNullable() throws IOException
public void requiredNullable_scenario3_optionalNonNullable_withOpenApiNullable() throws IOException {
Map files = generateFromContract(
"src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
- Map.of(CodegenConstants.OPENAPI_NULLABLE, "true"));
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "true",
+ CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true",
+ CodegenConstants.GENERATE_JSON_SETTER_NULLS_ANNOTATIONS, "true"));
Path modelFile = files.get("TestModel.kt").toPath();
String content = Files.readString(modelFile);
@@ -6687,7 +6690,8 @@ public void requiredNullable_scenario3_optionalNonNullable_withOpenApiNullable()
public void requiredNullable_scenario3_optionalNonNullable_withDefault() throws IOException {
Map files = generateFromContract(
"src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
- new HashMap<>());
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true",
+ CodegenConstants.GENERATE_JSON_SETTER_NULLS_ANNOTATIONS, "true"));
Path modelFile = files.get("TestModel.kt").toPath();
String content = Files.readString(modelFile);
@@ -6763,6 +6767,7 @@ public void requiredNullable_scenario3_optionalNonNullable_withJackson3() throws
Map props = new HashMap<>();
props.put(KotlinSpringServerCodegen.USE_SPRING_BOOT4, "true");
props.put(CodegenConstants.OPENAPI_NULLABLE, "true");
+ props.put(CodegenConstants.GENERATE_JSON_SETTER_NULLS_ANNOTATIONS, "true");
Map files = generateFromContract(
"src/test/resources/3_0/kotlin/required-nullable-4-states.yaml", props);
@@ -6779,28 +6784,245 @@ public void requiredNullable_scenario3_optionalNonNullable_withJackson3() throws
}
/**
- * Scenario 4 (openApiNullable=true): optional+nullable field must carry
- * {@code @field:JsonInclude(JsonInclude.Include.NON_ABSENT)} so that Jackson
- * excludes {@code JsonNullable.undefined()} from serialized output.
+ * Issue #24401: optional+nullable ({@code JsonNullable}) fields must no longer carry
+ * {@code @field:JsonInclude(NON_ABSENT)} — the JsonNullable module already governs their inclusion.
*/
- @Test(description = "Scenario 4 – optional+nullable with openApiNullable=true: @JsonInclude(NON_ABSENT) guards undefined from serialization")
- public void requiredNullable_scenario4_optionalNullable_hasNonAbsentAnnotation() throws IOException {
+ @Test(description = "Issue #24401 – optional+nullable with openApiNullable=true: no @JsonInclude annotation")
+ public void requiredNullable_scenario4_optionalNullable_hasNoJsonIncludeAnnotation() throws IOException {
Map files = generateFromContract(
"src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
Map.of(CodegenConstants.OPENAPI_NULLABLE, "true"));
Path modelFile = files.get("TestModel.kt").toPath();
- String content = Files.readString(modelFile);
- int idx = content.indexOf("val optionalNullable:");
- Assert.assertTrue(idx >= 0, "optionalNullable property must exist");
- // Annotations appear before the val declaration
- String context = content.substring(Math.max(0, idx - 300), idx);
- Assert.assertTrue(context.contains("@field:JsonInclude(JsonInclude.Include.NON_ABSENT)"),
- "optionalNullable must have @field:JsonInclude(NON_ABSENT) to suppress JsonNullable.undefined() from output");
- // Must NOT have NON_NULL — that annotation is only for non-nullable optional fields
- Assert.assertFalse(context.contains("@field:JsonInclude(JsonInclude.Include.NON_NULL)"),
- "optionalNullable must NOT have @field:JsonInclude(NON_NULL); only non-nullable optionals use NON_NULL");
- assertFileContains(modelFile, "import com.fasterxml.jackson.annotation.JsonInclude");
+ // NON_ABSENT must no longer be emitted anywhere
+ assertFileNotContains(modelFile, "@field:JsonInclude(JsonInclude.Include.NON_ABSENT)");
+ // optionalNullable must still be a JsonNullable wrapper
+ assertFileContains(modelFile, "JsonNullable");
+ }
+
+ /**
+ * Issue #24401 (safe-but-noisy): with no flags set, kotlin-spring defaults to weak/7.23.0 behavior —
+ * NO policy {@code @field:JsonInclude} or {@code @field:JsonSetter(nulls)} annotations are emitted.
+ */
+ @Test(description = "Issue #24401 – unset flags emit no policy annotations (kotlin-spring)")
+ public void jsonInclude_unset_emitsNoPolicyAnnotations() throws IOException {
+ Map files = generateFromContract(
+ "src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "true"));
+
+ Path modelFile = files.get("TestModel.kt").toPath();
+ assertFileNotContains(modelFile, "@field:JsonInclude(");
+ assertFileNotContains(modelFile, "@field:JsonSetter(");
+ }
+
+ /**
+ * Issue #24401: default matrix for kotlin-spring. required fields -> ALWAYS,
+ * optional non-nullable -> NON_NULL (default policy), optional nullable -> no annotation.
+ */
+ @Test(description = "Issue #24401 – default @JsonInclude matrix (kotlin-spring)")
+ public void jsonInclude_kotlinMatrix_default() throws IOException {
+ Map files = generateFromContract(
+ "src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true"));
+
+ String content = Files.readString(files.get("TestModel.kt").toPath());
+ Assert.assertTrue(jsonIncludeBlockFor(content, "requiredNonNullable").contains("@field:JsonInclude(JsonInclude.Include.ALWAYS)"),
+ "required non-nullable must be ALWAYS");
+ Assert.assertTrue(jsonIncludeBlockFor(content, "requiredNullable").contains("@field:JsonInclude(JsonInclude.Include.ALWAYS)"),
+ "required nullable must be ALWAYS");
+ Assert.assertTrue(jsonIncludeBlockFor(content, "optionalNonNullable").contains("@field:JsonInclude(JsonInclude.Include.NON_NULL)"),
+ "optional non-nullable must be NON_NULL by default");
+ Assert.assertFalse(jsonIncludeBlockFor(content, "optionalNullable").contains("@field:JsonInclude"),
+ "optional nullable must have no @JsonInclude annotation");
+ }
+
+ /**
+ * Issue #24401: {@code optionalNonNullPropertyJsonInclude=NONE} omits the annotation on optional
+ * non-nullable properties while keeping the required-field protection.
+ */
+ @Test(description = "Issue #24401 – optionalNonNullPropertyJsonInclude=NONE (kotlin-spring)")
+ public void jsonInclude_optionalNonNullPolicy_none() throws IOException {
+ Map files = generateFromContract(
+ "src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true",
+ CodegenConstants.OPTIONAL_NON_NULL_PROPERTY_JSON_INCLUDE, "NONE"));
+
+ String content = Files.readString(files.get("TestModel.kt").toPath());
+ Assert.assertFalse(jsonIncludeBlockFor(content, "optionalNonNullable").contains("@field:JsonInclude"),
+ "optional non-nullable must have no annotation when policy is NONE");
+ Assert.assertTrue(jsonIncludeBlockFor(content, "requiredNonNullable").contains("@field:JsonInclude(JsonInclude.Include.ALWAYS)"),
+ "required-field protection must still be present");
+ }
+
+ /**
+ * Issue #24401: {@code generateJsonIncludeAnnotations=false} removes ALL policy @JsonInclude
+ * annotations, including required-field protection.
+ */
+ @Test(description = "Issue #24401 – generateJsonIncludeAnnotations=false removes all policy annotations (kotlin-spring)")
+ public void jsonInclude_generateJsonIncludeAnnotations_false() throws IOException {
+ Map files = generateFromContract(
+ "src/test/resources/3_0/kotlin/required-nullable-4-states.yaml",
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "false"));
+
+ assertFileNotContains(files.get("TestModel.kt").toPath(), "@field:JsonInclude(");
+ }
+
+ /**
+ * Issue #24401: a manual per-property {@code x-jackson-json-include-policy} vendor extension always
+ * overrides the automatic behavior, even when {@code generateJsonIncludeAnnotations=false}.
+ */
+ @Test(description = "Issue #24401 – manual vendor-extension override wins (kotlin-spring)")
+ public void jsonInclude_manualOverride_winsOverGenerateFlag() throws IOException {
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_override.yaml",
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "false"));
+
+ String content = Files.readString(files.get("TestModel.kt").toPath());
+ Assert.assertTrue(jsonIncludeBlockFor(content, "overridden").contains("@field:JsonInclude(JsonInclude.Include.NON_EMPTY)"),
+ "manual override must be honored even with generateJsonIncludeAnnotations=false");
+ Assert.assertFalse(jsonIncludeBlockFor(content, "plain").contains("@field:JsonInclude"),
+ "non-overridden field must have no annotation when generateJsonIncludeAnnotations=false");
+ }
+
+ /**
+ * Returns the source region isolating a single property's annotations, bounded by the previous
+ * property's {@code @get:JsonProperty} marker, so @field:JsonInclude checks are property-specific.
+ */
+ private static String jsonIncludeBlockFor(String content, String propName) {
+ int end = content.indexOf("@get:JsonProperty(\"" + propName + "\"");
+ Assert.assertTrue(end >= 0, propName + " property must exist");
+ int prev = content.lastIndexOf("@get:JsonProperty(", end - 1);
+ return content.substring(Math.max(0, prev), end);
+ }
+
+ /**
+ * Issue #24401: with one property per schema, each generated model must import exactly the Jackson
+ * annotations its single property needs. openApiNullable=true so optional nullable uses JsonNullable.
+ */
+ @Test(description = "Issue #24401 – per-schema import isolation (kotlin-spring)")
+ public void jsonInclude_perSchemaImports() throws IOException {
+ final String jsonInclude = "import com.fasterxml.jackson.annotation.JsonInclude";
+ final String jsonSetter = "import com.fasterxml.jackson.annotation.JsonSetter";
+ final String nulls = "import com.fasterxml.jackson.annotation.Nulls";
+ final String jsonNullable = "import org.openapitools.jackson.nullable.JsonNullable";
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "true",
+ CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true",
+ CodegenConstants.GENERATE_JSON_SETTER_NULLS_ANNOTATIONS, "true"));
+
+ // required non-nullable -> @field:JsonInclude(ALWAYS); no setter/nullable machinery
+ Path requiredNonNullable = files.get("RequiredNonNullable.kt").toPath();
+ assertFileContains(requiredNonNullable, jsonInclude);
+ assertFileNotContains(requiredNonNullable, jsonSetter, nulls, jsonNullable);
+ // required nullable -> @field:JsonInclude(ALWAYS)
+ Path requiredNullable = files.get("RequiredNullable.kt").toPath();
+ assertFileContains(requiredNullable, jsonInclude);
+ assertFileNotContains(requiredNullable, jsonSetter, nulls, jsonNullable);
+ // optional non-nullable -> @field:JsonInclude(NON_NULL) + @field:JsonSetter(Nulls.FAIL)
+ Path optionalNonNullable = files.get("OptionalNonNullable.kt").toPath();
+ assertFileContains(optionalNonNullable, jsonInclude, jsonSetter, nulls);
+ assertFileNotContains(optionalNonNullable, jsonNullable);
+ // optional nullable with openApiNullable=true -> JsonNullable, NO @field:JsonInclude
+ Path optionalNullable = files.get("OptionalNullable.kt").toPath();
+ assertFileContains(optionalNullable, jsonNullable);
+ assertFileNotContains(optionalNullable, jsonInclude, jsonSetter, nulls);
+ }
+
+ /**
+ * Issue #24401: even with {@code generateJsonIncludeAnnotations=false}, a manual per-property vendor
+ * extension must still emit its annotation AND the JsonInclude import must be present.
+ */
+ @Test(description = "Issue #24401 – manual override emits import even when annotations disabled (kotlin-spring)")
+ public void jsonInclude_manualOverride_emitsImport_whenAnnotationsDisabled() throws IOException {
+ final String jsonInclude = "import com.fasterxml.jackson.annotation.JsonInclude";
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "false"));
+
+ Path manualOverride = files.get("ManualOverride.kt").toPath();
+ assertFileContains(manualOverride, jsonInclude);
+ Assert.assertTrue(jsonIncludeBlockFor(Files.readString(manualOverride), "value")
+ .contains("@field:JsonInclude(JsonInclude.Include.NON_EMPTY)"),
+ "manual override must be emitted even when generateJsonIncludeAnnotations=false");
+ // A schema without the override must not import JsonInclude when annotations are disabled
+ assertFileNotContains(files.get("OptionalNonNullable.kt").toPath(), jsonInclude);
+ }
+
+ /**
+ * Issue #24401: a forced override on an optional+nullable ({@code JsonNullable}) property must be
+ * respected — the annotation is emitted and the JsonInclude import is added.
+ */
+ @Test(description = "Issue #24401 – forced override on JsonNullable emits annotation and import (kotlin-spring)")
+ public void jsonInclude_forcedOverride_onJsonNullable_emitsAnnotationAndImport() throws IOException {
+ final String jsonInclude = "import com.fasterxml.jackson.annotation.JsonInclude";
+ final String jsonNullable = "import org.openapitools.jackson.nullable.JsonNullable";
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ Map.of(CodegenConstants.OPENAPI_NULLABLE, "true"));
+
+ Path forced = files.get("ForcedOnJsonNullable.kt").toPath();
+ assertFileContains(forced, jsonInclude, jsonNullable, "JsonNullable");
+ Assert.assertTrue(jsonIncludeBlockFor(Files.readString(forced), "value")
+ .contains("@field:JsonInclude(JsonInclude.Include.NON_NULL)"),
+ "forced override on JsonNullable field must be emitted");
+ }
+
+ /**
+ * Issue #24401: a manual per-property override of {@code NONE} means "emit no annotation". Neither the
+ * {@code @field:JsonInclude} annotation nor its import may be generated, otherwise the output fails to compile.
+ */
+ @Test(description = "Issue #24401 – manual NONE override emits no annotation or import (kotlin-spring)")
+ public void jsonInclude_manualOverride_none_emitsNoAnnotationOrImport() throws IOException {
+ final String jsonInclude = "import com.fasterxml.jackson.annotation.JsonInclude";
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true"));
+
+ Path manualNone = files.get("ManualNone.kt").toPath();
+ assertFileNotContains(manualNone, jsonInclude);
+ Assert.assertFalse(Files.readString(manualNone).contains("@field:JsonInclude"),
+ "manual NONE override must emit no @field:JsonInclude annotation");
+ }
+
+ /**
+ * Issue #24401: a whitespace-padded {@code NONE} override must be treated identically to a bare
+ * {@code NONE} — the sentinel comparison must trim before checking, otherwise it falls through to
+ * validation and generation fails for a value that should simply suppress the annotation.
+ */
+ @Test(description = "Issue #24401 – padded NONE override emits no annotation or import (kotlin-spring)")
+ public void jsonInclude_manualOverride_paddedNone_emitsNoAnnotationOrImport() throws IOException {
+ final String jsonInclude = "import com.fasterxml.jackson.annotation.JsonInclude";
+
+ Map files = generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml",
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true"));
+
+ Path manualNonePadded = files.get("ManualNonePadded.kt").toPath();
+ assertFileNotContains(manualNonePadded, jsonInclude);
+ Assert.assertFalse(Files.readString(manualNonePadded).contains("@field:JsonInclude"),
+ "padded NONE override must emit no @field:JsonInclude annotation");
+ }
+
+ /**
+ * Issue #24401: an invalid manual per-property override must fail fast with an actionable error
+ * during generation rather than emitting uncompilable Kotlin.
+ */
+ @Test(description = "Issue #24401 – invalid manual override fails fast (kotlin-spring)")
+ public void jsonInclude_manualOverride_invalid_failsWithActionableError() {
+ Throwable thrown = Assert.expectThrows(Throwable.class, () -> generateFromContract(
+ "src/test/resources/3_0/spring/issue_24401_json_include_invalid_override.yaml",
+ Map.of(CodegenConstants.GENERATE_JSON_INCLUDE_ANNOTATIONS, "true")));
+
+ java.io.StringWriter sw = new java.io.StringWriter();
+ thrown.printStackTrace(new java.io.PrintWriter(sw));
+ String trace = sw.toString();
+ Assert.assertTrue(trace.contains("x-jackson-json-include-policy") && trace.contains("NOT_A_REAL_POLICY"),
+ "expected an actionable error naming the invalid policy, but got: " + trace);
}
/**
@@ -7087,6 +7309,7 @@ public void testIssue24139NullableRefNoJsonSetterNullsFail() throws IOException
Map additionalProperties = new HashMap<>();
additionalProperties.put("useBeanValidation", true);
additionalProperties.put("openApiNullable", "true");
+ additionalProperties.put(CodegenConstants.GENERATE_JSON_SETTER_NULLS_ANNOTATIONS, "true");
Map files = generateFromContract(
"src/test/resources/3_1/issue_24139.yaml",
diff --git a/modules/openapi-generator/src/test/resources/3_0/spring/issue_24401_json_include_invalid_override.yaml b/modules/openapi-generator/src/test/resources/3_0/spring/issue_24401_json_include_invalid_override.yaml
new file mode 100644
index 000000000000..39d6b3ed12eb
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/3_0/spring/issue_24401_json_include_invalid_override.yaml
@@ -0,0 +1,28 @@
+openapi: 3.0.0
+info:
+ title: JsonInclude invalid manual override test
+ version: 1.0.0
+ description: >
+ A single schema whose property carries an invalid x-jackson-json-include-policy value.
+ Generation must fail fast with an actionable error rather than emitting uncompilable output.
+paths:
+ /test:
+ post:
+ operationId: testPost
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InvalidOverride'
+ responses:
+ '200':
+ description: OK
+components:
+ schemas:
+ InvalidOverride:
+ type: object
+ properties:
+ value:
+ type: string
+ nullable: false
+ x-jackson-json-include-policy: NOT_A_REAL_POLICY
diff --git a/modules/openapi-generator/src/test/resources/3_0/spring/issue_24401_json_include_override.yaml b/modules/openapi-generator/src/test/resources/3_0/spring/issue_24401_json_include_override.yaml
new file mode 100644
index 000000000000..c39028982365
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/3_0/spring/issue_24401_json_include_override.yaml
@@ -0,0 +1,30 @@
+openapi: 3.0.0
+info:
+ title: JsonInclude manual override test
+ version: 1.0.0
+paths:
+ /test:
+ post:
+ operationId: testPost
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TestModel'
+ responses:
+ '200':
+ description: OK
+components:
+ schemas:
+ TestModel:
+ type: object
+ properties:
+ # Manual per-property override via the universal vendor extension.
+ overridden:
+ type: string
+ nullable: false
+ x-jackson-json-include-policy: NON_EMPTY
+ # No override: with generateJsonIncludeAnnotations=false this must get no annotation.
+ plain:
+ type: string
+ nullable: false
diff --git a/modules/openapi-generator/src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml b/modules/openapi-generator/src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml
new file mode 100644
index 000000000000..5e10c8cf438e
--- /dev/null
+++ b/modules/openapi-generator/src/test/resources/3_0/spring/issue_24401_json_include_per_schema.yaml
@@ -0,0 +1,99 @@
+openapi: 3.0.0
+info:
+ title: JsonInclude per-schema import isolation test
+ version: 1.0.0
+ description: >
+ Each schema holds exactly one property covering one required/optional x
+ nullable/non-nullable combination. Isolating a single case per model ensures the
+ generated imports (JsonInclude, JsonSetter, Nulls, JsonNullable) are correct for
+ every case on their own, without another property masking a missing import.
+paths:
+ /test:
+ post:
+ operationId: testPost
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequiredNonNullable'
+ responses:
+ '200':
+ description: OK
+components:
+ schemas:
+ # required + non-nullable
+ RequiredNonNullable:
+ type: object
+ required:
+ - value
+ properties:
+ value:
+ type: string
+ nullable: false
+ # required + nullable
+ RequiredNullable:
+ type: object
+ required:
+ - value
+ properties:
+ value:
+ type: string
+ nullable: true
+ # optional + non-nullable
+ OptionalNonNullable:
+ type: object
+ properties:
+ value:
+ type: string
+ nullable: false
+ # optional + non-nullable with a default value
+ OptionalNonNullableWithDefault:
+ type: object
+ properties:
+ value:
+ type: string
+ nullable: false
+ default: "defaultValue"
+ # optional + nullable
+ OptionalNullable:
+ type: object
+ properties:
+ value:
+ type: string
+ nullable: true
+ # manual per-property override: even with generateJsonIncludeAnnotations=false the
+ # annotation (and its import) must still be emitted from the vendor extension.
+ ManualOverride:
+ type: object
+ properties:
+ value:
+ type: string
+ nullable: false
+ x-jackson-json-include-policy: NON_EMPTY
+ # forced override on an optional + nullable (JsonNullable) property: the automatic path emits
+ # nothing here, but an explicit vendor extension must be respected and its import added.
+ ForcedOnJsonNullable:
+ type: object
+ properties:
+ value:
+ type: string
+ nullable: true
+ x-jackson-json-include-policy: NON_NULL
+ # manual per-property override of NONE: the sentinel means "emit no annotation", so neither the
+ # @JsonInclude annotation nor its import must be generated (otherwise the output fails to compile).
+ ManualNone:
+ type: object
+ properties:
+ value:
+ type: string
+ nullable: false
+ x-jackson-json-include-policy: NONE
+ # manual per-property override of NONE padded with whitespace: must be treated identically to a
+ # bare NONE (normalization must trim before comparing), i.e. emit no annotation, no validation error.
+ ManualNonePadded:
+ type: object
+ properties:
+ value:
+ type: string
+ nullable: false
+ x-jackson-json-include-policy: " NONE "
diff --git a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java
index 4aa4e0f36117..83c89d9c9800 100644
--- a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java
+++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/model/Pet.java
@@ -29,6 +29,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class Pet {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String atType = "Pet";
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java
index 0d9d99f20e09..53b64044c6e3 100644
--- a/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java
+++ b/samples/client/petstore/spring-cloud-deprecated/src/main/java/org/openapitools/model/Pet.java
@@ -36,8 +36,10 @@ public class Pet {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Category category;
+ @JsonInclude(JsonInclude.Include.ALWAYS)
private JsonNullable name = JsonNullable.undefined();
+ @JsonInclude(JsonInclude.Include.NON_NULL)
@Deprecated
private List photoUrls = new ArrayList<>();
diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java
index 37d29c32b8da..c16ac8affc4e 100644
--- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java
+++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/model/Pet.java
@@ -36,8 +36,10 @@ public class Pet {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Category category;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List photoUrls = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java
index f655d26b20a7..141ad532407c 100644
--- a/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java
+++ b/samples/client/petstore/spring-cloud-tags/src/main/java/org/openapitools/model/Pet.java
@@ -36,8 +36,10 @@ public class Pet {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Category category;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List photoUrls = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java
index 37d29c32b8da..c16ac8affc4e 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java
@@ -36,8 +36,10 @@ public class Pet {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Category category;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List photoUrls = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java
index 46a16d7fe21d..fb95071ae45f 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java
@@ -58,7 +58,6 @@ public class AdditionalPropertiesClassDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Object anytype1;
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable anytype2 = JsonNullable.undefined();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java
index c724049e493b..ccfe65d189e1 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/AnimalDto.java
@@ -37,6 +37,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class AnimalDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String className;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java
index 20129cb89013..44a1a1ea0b01 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/CategoryDto.java
@@ -27,6 +27,7 @@ public class CategoryDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Long id;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name = "default-name";
public CategoryDto() {
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java
index ccb8f5a5647f..d88271c2bf46 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java
@@ -29,14 +29,14 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class ContainerDefaultValueDto {
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> nullableArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.ALWAYS)
private JsonNullable> nullableRequiredArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List requiredArray = new ArrayList<>();
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined();
public ContainerDefaultValueDto() {
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java
index 9c39a7569a81..250a8a7fa9fb 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/EnumTestDto.java
@@ -103,6 +103,7 @@ public static EnumStringRequiredEnum fromValue(String value) {
}
}
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private EnumStringRequiredEnum enumStringRequired;
/**
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java
index ac2ef6be7859..0db61103ab8a 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/FormatTestDto.java
@@ -39,6 +39,7 @@ public class FormatTestDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Long int64;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal number;
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -50,11 +51,13 @@ public class FormatTestDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable String string;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private byte[] _byte;
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable org.springframework.core.io.Resource binary;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
private LocalDate date;
@@ -65,6 +68,7 @@ public class FormatTestDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable UUID uuid;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String password;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java
index e11dd113cbc2..9dcea8d6c27b 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NameDto.java
@@ -24,6 +24,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class NameDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer name;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java
index 350b970a945d..f84d9d21f9cf 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/NullableMapPropertyDto.java
@@ -2,7 +2,6 @@
import java.net.URI;
import java.util.Objects;
-import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
@@ -29,7 +28,6 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class NullableMapPropertyDto {
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> languageValues = JsonNullable.>undefined();
public NullableMapPropertyDto languageValues(Map languageValues) {
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java
index 1d18853e2e2e..cb3f764522a6 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/ParentWithNullableDto.java
@@ -75,7 +75,6 @@ public static TypeEnum fromValue(String value) {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable TypeEnum type;
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable nullableProperty = JsonNullable.undefined();
public ParentWithNullableDto type(@Nullable TypeEnum type) {
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java
index 2052979417f7..b4eda9e7f9c4 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/PetDto.java
@@ -39,8 +39,10 @@ public class PetDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable CategoryDto category;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Set photoUrls = new LinkedHashSet<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java
index 99d18a336d78..a1c213eb40de 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
@@ -27,14 +28,19 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderDefaultDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem = "what";
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem = new BigDecimal("1.234");
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem = -2;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem = true;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3));
public TypeHolderDefaultDto() {
diff --git a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java
index b0faf5aaa9ae..b0f401268821 100644
--- a/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java
+++ b/samples/client/petstore/spring-http-interface-bean-validation/src/main/java/org/openapitools/model/TypeHolderExampleDto.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
@@ -27,16 +28,22 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderExampleDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Float floatItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>();
public TypeHolderExampleDto() {
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java
index b893bb4ec7c6..613b36dd183c 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java
@@ -57,7 +57,6 @@ public class AdditionalPropertiesClassDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Object anytype1;
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable anytype2 = JsonNullable.undefined();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AnimalDto.java
index e301cd61dba3..67474f01ec05 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AnimalDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/AnimalDto.java
@@ -36,6 +36,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class AnimalDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String className;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/CategoryDto.java
index 5c51fa54cc0a..ca80887aed58 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/CategoryDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/CategoryDto.java
@@ -26,6 +26,7 @@ public class CategoryDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Long id;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name = "default-name";
public CategoryDto() {
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java
index af2b07f95d73..fe0be24e229d 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java
@@ -28,14 +28,14 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class ContainerDefaultValueDto {
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> nullableArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.ALWAYS)
private JsonNullable> nullableRequiredArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List requiredArray = new ArrayList<>();
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined();
public ContainerDefaultValueDto() {
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/EnumTestDto.java
index 5263a4e2bc96..5069a1a9acbb 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/EnumTestDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/EnumTestDto.java
@@ -102,6 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) {
}
}
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private EnumStringRequiredEnum enumStringRequired;
/**
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/FormatTestDto.java
index 18101da678fa..c68a2728bcb1 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/FormatTestDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/FormatTestDto.java
@@ -38,6 +38,7 @@ public class FormatTestDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Long int64;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal number;
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -49,11 +50,13 @@ public class FormatTestDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable String string;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private byte[] _byte;
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable org.springframework.core.io.Resource binary;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
private LocalDate date;
@@ -64,6 +67,7 @@ public class FormatTestDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable UUID uuid;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String password;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NameDto.java
index 0d4be7ac8140..b6b48d488ede 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NameDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NameDto.java
@@ -23,6 +23,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class NameDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer name;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java
index f93832a65c98..d9edf72050f1 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/NullableMapPropertyDto.java
@@ -2,7 +2,6 @@
import java.net.URI;
import java.util.Objects;
-import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
@@ -28,7 +27,6 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class NullableMapPropertyDto {
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> languageValues = JsonNullable.>undefined();
public NullableMapPropertyDto languageValues(Map languageValues) {
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullableDto.java
index 2300afd143a4..af08c71fb48f 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullableDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullableDto.java
@@ -74,7 +74,6 @@ public static TypeEnum fromValue(String value) {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable TypeEnum type;
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable nullableProperty = JsonNullable.undefined();
public ParentWithNullableDto type(@Nullable TypeEnum type) {
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/PetDto.java
index 0ce2b93a2b0f..791eea25f843 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/PetDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/PetDto.java
@@ -38,8 +38,10 @@ public class PetDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable CategoryDto category;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Set photoUrls = new LinkedHashSet<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java
index 987983e43451..8ca218f8c704 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
@@ -26,14 +27,19 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderDefaultDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem = "what";
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem = new BigDecimal("1.234");
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem = -2;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem = true;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3));
public TypeHolderDefaultDto() {
diff --git a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExampleDto.java
index 4db40f3db382..eea548352cc7 100644
--- a/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExampleDto.java
+++ b/samples/client/petstore/spring-http-interface-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExampleDto.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
@@ -26,16 +27,22 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderExampleDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Float floatItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>();
public TypeHolderExampleDto() {
diff --git a/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/CategoryDto.java
index 457dd9ab011f..60c38d69c87f 100644
--- a/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/CategoryDto.java
+++ b/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/CategoryDto.java
@@ -25,9 +25,11 @@
public class CategoryDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Long id;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String name;
public CategoryDto id(@Nullable Long id) {
@@ -45,7 +47,6 @@ public CategoryDto id(@Nullable Long id) {
return id;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
@@ -66,7 +67,6 @@ public CategoryDto name(@Nullable String name) {
return name;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
diff --git a/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/PetDto.java
index 2bec6c231fc2..6a6e87714952 100644
--- a/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/PetDto.java
+++ b/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/PetDto.java
@@ -31,16 +31,21 @@
public class PetDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Long id;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable CategoryDto category;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List photoUrls = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List tags = new ArrayList<>();
/**
@@ -81,6 +86,7 @@ public static StatusEnum fromValue(String value) {
}
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
@Deprecated
private @Nullable StatusEnum status;
@@ -103,7 +109,6 @@ public PetDto id(@Nullable Long id) {
return id;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
@@ -124,7 +129,6 @@ public PetDto category(@Nullable CategoryDto category) {
return category;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("category")
public void setCategory(@Nullable CategoryDto category) {
this.category = category;
@@ -201,7 +205,6 @@ public List getTags() {
return tags;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("tags")
public void setTags(List tags) {
this.tags = tags;
@@ -227,7 +230,6 @@ public PetDto status(@Nullable StatusEnum status) {
/**
* @deprecated
*/
- @JsonSetter(nulls = Nulls.SKIP)
@Deprecated
@JsonProperty("status")
public void setStatus(@Nullable StatusEnum status) {
diff --git a/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/TagDto.java b/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/TagDto.java
index 453c993f1953..9f054df0c7c2 100644
--- a/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/TagDto.java
+++ b/samples/client/petstore/spring-http-interface-oauth/src/main/java/org/openapitools/model/TagDto.java
@@ -25,9 +25,11 @@
public class TagDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Long id;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String name;
public TagDto id(@Nullable Long id) {
@@ -45,7 +47,6 @@ public TagDto id(@Nullable Long id) {
return id;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
@@ -66,7 +67,6 @@ public TagDto name(@Nullable String name) {
return name;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
index 0cd4c4edbd58..d143dbf68f9c 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
@@ -56,7 +56,6 @@ public class AdditionalPropertiesClass {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Object anytype1;
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable anytype2 = JsonNullable.undefined();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java
index 282ca2ce689b..fe52d0aa116a 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Animal.java
@@ -36,6 +36,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class Animal {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String className;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java
index 6778a62dfd5e..a606369f1c61 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Category.java
@@ -25,6 +25,7 @@ public class Category {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Long id;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name = "default-name";
public Category() {
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java
index 16f74d8223aa..ca932fee5f0f 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ContainerDefaultValue.java
@@ -27,14 +27,14 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class ContainerDefaultValue {
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> nullableArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.ALWAYS)
private JsonNullable> nullableRequiredArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List requiredArray = new ArrayList<>();
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined();
public ContainerDefaultValue() {
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java
index 54c2c98f7fe4..58945182bd97 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/EnumTest.java
@@ -103,6 +103,7 @@ public static EnumStringRequiredEnum fromValue(String value) {
}
}
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private EnumStringRequiredEnum enumStringRequired;
/**
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java
index c2dc9d17f0b8..fe3df02f9da4 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/FormatTest.java
@@ -39,6 +39,7 @@ public class FormatTest {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Long int64;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal number;
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -50,11 +51,13 @@ public class FormatTest {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable String string;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private byte[] _byte;
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable org.springframework.core.io.Resource binary;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
private LocalDate date;
@@ -65,6 +68,7 @@ public class FormatTest {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable UUID uuid;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String password;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java
index 07be2f99663a..1edf0813d0b5 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Name.java
@@ -22,6 +22,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class Name {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer name;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java
index 3abb813498f2..dff5aa4523f8 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/NullableMapProperty.java
@@ -2,7 +2,6 @@
import java.net.URI;
import java.util.Objects;
-import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Arrays;
@@ -27,7 +26,6 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class NullableMapProperty {
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> languageValues = JsonNullable.>undefined();
public NullableMapProperty languageValues(Map languageValues) {
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java
index 79e274840817..9b895427687b 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/ParentWithNullable.java
@@ -74,7 +74,6 @@ public static TypeEnum fromValue(String value) {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable TypeEnum type;
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable nullableProperty = JsonNullable.undefined();
public ParentWithNullable type(@Nullable TypeEnum type) {
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java
index be762175a56b..2e84df56c536 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/Pet.java
@@ -37,8 +37,10 @@ public class Pet {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Category category;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Set photoUrls = new LinkedHashSet<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java
index 1f8e4dc3d890..7aedd82ea28e 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderDefault.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.math.BigDecimal;
@@ -25,14 +26,19 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderDefault {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem = "what";
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem = new BigDecimal("1.234");
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem = -2;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem = true;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3));
public TypeHolderDefault() {
diff --git a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java
index d37cdc713ec3..f1609752ba2f 100644
--- a/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java
+++ b/samples/client/petstore/spring-http-interface-reactive-bean-validation/src/main/java/org/openapitools/model/TypeHolderExample.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.math.BigDecimal;
@@ -25,16 +26,22 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderExample {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Float floatItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>();
public TypeHolderExample() {
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
index 120027d72686..b266f37f4576 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
@@ -55,7 +55,6 @@ public class AdditionalPropertiesClass {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Object anytype1;
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable anytype2 = JsonNullable.undefined();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Animal.java
index f5d220bc1b43..29ecd6ae4724 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Animal.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Animal.java
@@ -35,6 +35,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class Animal {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String className;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Category.java
index bcd733ba06d7..dd15acc4171f 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Category.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Category.java
@@ -24,6 +24,7 @@ public class Category {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Long id;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name = "default-name";
public Category() {
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java
index a348b064c179..31a8133cb94f 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ContainerDefaultValue.java
@@ -26,14 +26,14 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class ContainerDefaultValue {
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> nullableArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.ALWAYS)
private JsonNullable> nullableRequiredArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List requiredArray = new ArrayList<>();
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined();
public ContainerDefaultValue() {
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java
index c62cf18d0eee..07926663552d 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/EnumTest.java
@@ -102,6 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) {
}
}
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private EnumStringRequiredEnum enumStringRequired;
/**
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java
index c0831401197a..f4aea008dfa3 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/FormatTest.java
@@ -38,6 +38,7 @@ public class FormatTest {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Long int64;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal number;
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -49,11 +50,13 @@ public class FormatTest {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable String string;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private byte[] _byte;
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable org.springframework.core.io.Resource binary;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
private LocalDate date;
@@ -64,6 +67,7 @@ public class FormatTest {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable UUID uuid;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String password;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Name.java
index f237f6637dd5..5be398a7e1c9 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Name.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Name.java
@@ -21,6 +21,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class Name {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer name;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java
index d5fda5613396..5e0395f3fd34 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/NullableMapProperty.java
@@ -2,7 +2,6 @@
import java.net.URI;
import java.util.Objects;
-import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Arrays;
@@ -26,7 +25,6 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class NullableMapProperty {
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> languageValues = JsonNullable.>undefined();
public NullableMapProperty languageValues(Map languageValues) {
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java
index 40350659ae78..a2e4fd94701a 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java
@@ -73,7 +73,6 @@ public static TypeEnum fromValue(String value) {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable TypeEnum type;
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable nullableProperty = JsonNullable.undefined();
public ParentWithNullable type(@Nullable TypeEnum type) {
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java
index 89685de90050..906fa96ae1ee 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java
@@ -36,8 +36,10 @@ public class Pet {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Category category;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Set photoUrls = new LinkedHashSet<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java
index 4bf6cba777df..e8978ec83178 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderDefault.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.math.BigDecimal;
@@ -24,14 +25,19 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderDefault {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem = "what";
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem = new BigDecimal("1.234");
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem = -2;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem = true;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3));
public TypeHolderDefault() {
diff --git a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java
index 5e77ca347711..4caccae69640 100644
--- a/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java
+++ b/samples/client/petstore/spring-http-interface-reactive-noResponseEntity/src/main/java/org/openapitools/model/TypeHolderExample.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.math.BigDecimal;
@@ -24,16 +25,22 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderExample {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Float floatItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>();
public TypeHolderExample() {
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
index 120027d72686..b266f37f4576 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
@@ -55,7 +55,6 @@ public class AdditionalPropertiesClass {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Object anytype1;
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable anytype2 = JsonNullable.undefined();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java
index f5d220bc1b43..29ecd6ae4724 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Animal.java
@@ -35,6 +35,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class Animal {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String className;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java
index bcd733ba06d7..dd15acc4171f 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Category.java
@@ -24,6 +24,7 @@ public class Category {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Long id;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name = "default-name";
public Category() {
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java
index a348b064c179..31a8133cb94f 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ContainerDefaultValue.java
@@ -26,14 +26,14 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class ContainerDefaultValue {
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> nullableArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.ALWAYS)
private JsonNullable> nullableRequiredArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List requiredArray = new ArrayList<>();
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> nullableArrayWithDefault = JsonNullable.>undefined();
public ContainerDefaultValue() {
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java
index c62cf18d0eee..07926663552d 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/EnumTest.java
@@ -102,6 +102,7 @@ public static EnumStringRequiredEnum fromValue(String value) {
}
}
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private EnumStringRequiredEnum enumStringRequired;
/**
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java
index c0831401197a..f4aea008dfa3 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/FormatTest.java
@@ -38,6 +38,7 @@ public class FormatTest {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Long int64;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal number;
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -49,11 +50,13 @@ public class FormatTest {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable String string;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private byte[] _byte;
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable org.springframework.core.io.Resource binary;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
private LocalDate date;
@@ -64,6 +67,7 @@ public class FormatTest {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable UUID uuid;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String password;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java
index f237f6637dd5..5be398a7e1c9 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Name.java
@@ -21,6 +21,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class Name {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer name;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java
index d5fda5613396..5e0395f3fd34 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/NullableMapProperty.java
@@ -2,7 +2,6 @@
import java.net.URI;
import java.util.Objects;
-import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Arrays;
@@ -26,7 +25,6 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class NullableMapProperty {
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> languageValues = JsonNullable.>undefined();
public NullableMapProperty languageValues(Map languageValues) {
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java
index 40350659ae78..a2e4fd94701a 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java
@@ -73,7 +73,6 @@ public static TypeEnum fromValue(String value) {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable TypeEnum type;
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable nullableProperty = JsonNullable.undefined();
public ParentWithNullable type(@Nullable TypeEnum type) {
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java
index 89685de90050..906fa96ae1ee 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/Pet.java
@@ -36,8 +36,10 @@ public class Pet {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Category category;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Set photoUrls = new LinkedHashSet<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java
index 4bf6cba777df..e8978ec83178 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderDefault.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.math.BigDecimal;
@@ -24,14 +25,19 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderDefault {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem = "what";
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem = new BigDecimal("1.234");
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem = -2;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem = true;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3));
public TypeHolderDefault() {
diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java
index 5e77ca347711..4caccae69640 100644
--- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java
+++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/TypeHolderExample.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.math.BigDecimal;
@@ -24,16 +25,22 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderExample {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Float floatItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>();
public TypeHolderExample() {
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java
index 1cb856bede0d..295d6b496a00 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesAnyTypeDto.java
@@ -31,6 +31,7 @@
public class AdditionalPropertiesAnyTypeDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String name;
public AdditionalPropertiesAnyTypeDto name(@Nullable String name) {
@@ -48,7 +49,6 @@ public AdditionalPropertiesAnyTypeDto name(@Nullable String name) {
return name;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java
index 0676ea4382d6..1af5c4e3e427 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesArrayDto.java
@@ -32,6 +32,7 @@
public class AdditionalPropertiesArrayDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String name;
public AdditionalPropertiesArrayDto name(@Nullable String name) {
@@ -49,7 +50,6 @@ public AdditionalPropertiesArrayDto name(@Nullable String name) {
return name;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java
index 2241c7d959f3..5186257ff7e9 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesBooleanDto.java
@@ -31,6 +31,7 @@
public class AdditionalPropertiesBooleanDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String name;
public AdditionalPropertiesBooleanDto name(@Nullable String name) {
@@ -48,7 +49,6 @@ public AdditionalPropertiesBooleanDto name(@Nullable String name) {
return name;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java
index 2ea6bd2cd002..a8a585b40488 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesClassDto.java
@@ -31,35 +31,45 @@
public class AdditionalPropertiesClassDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map mapString = new HashMap<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map mapNumber = new HashMap<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map mapInteger = new HashMap<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map mapBoolean = new HashMap<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map> mapArrayInteger = new HashMap<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map> mapArrayAnytype = new HashMap<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map> mapMapString = new HashMap<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map> mapMapAnytype = new HashMap<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Object anytype1;
private @Nullable Object anytype2 = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Object anytype3;
public AdditionalPropertiesClassDto mapString(Map mapString) {
@@ -85,7 +95,6 @@ public Map getMapString() {
return mapString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("map_string")
public void setMapString(Map mapString) {
this.mapString = mapString;
@@ -114,7 +123,6 @@ public Map getMapNumber() {
return mapNumber;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("map_number")
public void setMapNumber(Map mapNumber) {
this.mapNumber = mapNumber;
@@ -143,7 +151,6 @@ public Map getMapInteger() {
return mapInteger;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("map_integer")
public void setMapInteger(Map mapInteger) {
this.mapInteger = mapInteger;
@@ -172,7 +179,6 @@ public Map getMapBoolean() {
return mapBoolean;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("map_boolean")
public void setMapBoolean(Map mapBoolean) {
this.mapBoolean = mapBoolean;
@@ -201,7 +207,6 @@ public Map> getMapArrayInteger() {
return mapArrayInteger;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("map_array_integer")
public void setMapArrayInteger(Map> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
@@ -230,7 +235,6 @@ public Map> getMapArrayAnytype() {
return mapArrayAnytype;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("map_array_anytype")
public void setMapArrayAnytype(Map> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
@@ -259,7 +263,6 @@ public Map> getMapMapString() {
return mapMapString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("map_map_string")
public void setMapMapString(Map> mapMapString) {
this.mapMapString = mapMapString;
@@ -288,7 +291,6 @@ public Map> getMapMapAnytype() {
return mapMapAnytype;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("map_map_anytype")
public void setMapMapAnytype(Map> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
@@ -309,7 +311,6 @@ public AdditionalPropertiesClassDto anytype1(@Nullable Object anytype1) {
return anytype1;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("anytype_1")
public void setAnytype1(@Nullable Object anytype1) {
this.anytype1 = anytype1;
@@ -350,7 +351,6 @@ public AdditionalPropertiesClassDto anytype3(@Nullable Object anytype3) {
return anytype3;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("anytype_3")
public void setAnytype3(@Nullable Object anytype3) {
this.anytype3 = anytype3;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java
index b316d3c81cda..5953b7ef4a6f 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesIntegerDto.java
@@ -31,6 +31,7 @@
public class AdditionalPropertiesIntegerDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String name;
public AdditionalPropertiesIntegerDto name(@Nullable String name) {
@@ -48,7 +49,6 @@ public AdditionalPropertiesIntegerDto name(@Nullable String name) {
return name;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java
index d5cc7439d547..5e1fd8bb52cb 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesNumberDto.java
@@ -32,6 +32,7 @@
public class AdditionalPropertiesNumberDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String name;
public AdditionalPropertiesNumberDto name(@Nullable String name) {
@@ -49,7 +50,6 @@ public AdditionalPropertiesNumberDto name(@Nullable String name) {
return name;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java
index 5ba2d44f1289..e074be7e9fc1 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesObjectDto.java
@@ -32,6 +32,7 @@
public class AdditionalPropertiesObjectDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String name;
public AdditionalPropertiesObjectDto name(@Nullable String name) {
@@ -49,7 +50,6 @@ public AdditionalPropertiesObjectDto name(@Nullable String name) {
return name;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java
index 1d2c057c67f8..7f2716e810b8 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AdditionalPropertiesStringDto.java
@@ -31,6 +31,7 @@
public class AdditionalPropertiesStringDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String name;
public AdditionalPropertiesStringDto name(@Nullable String name) {
@@ -48,7 +49,6 @@ public AdditionalPropertiesStringDto name(@Nullable String name) {
return name;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java
index 79eb758c01f0..4accd0918d94 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/AnimalDto.java
@@ -39,9 +39,11 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class AnimalDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String className;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private String color = "red";
public AnimalDto() {
@@ -83,7 +85,6 @@ public String getColor() {
return color;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("color")
public void setColor(String color) {
this.color = color;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java
index 816907e58b6a..1a2565b3fd59 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ApiResponseDto.java
@@ -27,12 +27,15 @@
public class ApiResponseDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer code;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String type;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String message;
public ApiResponseDto code(@Nullable Integer code) {
@@ -50,7 +53,6 @@ public ApiResponseDto code(@Nullable Integer code) {
return code;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("code")
public void setCode(@Nullable Integer code) {
this.code = code;
@@ -71,7 +73,6 @@ public ApiResponseDto type(@Nullable String type) {
return type;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("type")
public void setType(@Nullable String type) {
this.type = type;
@@ -92,7 +93,6 @@ public ApiResponseDto message(@Nullable String message) {
return message;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("message")
public void setMessage(@Nullable String message) {
this.message = message;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java
index fa600276dd17..5ffe266b5d11 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfArrayOfNumberOnlyDto.java
@@ -31,6 +31,7 @@
public class ArrayOfArrayOfNumberOnlyDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List> arrayArrayNumber = new ArrayList<>();
public ArrayOfArrayOfNumberOnlyDto arrayArrayNumber(List> arrayArrayNumber) {
@@ -56,7 +57,6 @@ public List> getArrayArrayNumber() {
return arrayArrayNumber;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("ArrayArrayNumber")
public void setArrayArrayNumber(List> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java
index 59a9a5cf1f8f..e2e197848a86 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayOfNumberOnlyDto.java
@@ -31,6 +31,7 @@
public class ArrayOfNumberOnlyDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List arrayNumber = new ArrayList<>();
public ArrayOfNumberOnlyDto arrayNumber(List arrayNumber) {
@@ -56,7 +57,6 @@ public List getArrayNumber() {
return arrayNumber;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("ArrayNumber")
public void setArrayNumber(List arrayNumber) {
this.arrayNumber = arrayNumber;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java
index 9d892b04ccdb..9f9cd29a27ce 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ArrayTestDto.java
@@ -31,12 +31,15 @@
public class ArrayTestDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List arrayOfString = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List> arrayArrayOfInteger = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List> arrayArrayOfModel = new ArrayList<>();
public ArrayTestDto arrayOfString(List arrayOfString) {
@@ -62,7 +65,6 @@ public List getArrayOfString() {
return arrayOfString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("array_of_string")
public void setArrayOfString(List arrayOfString) {
this.arrayOfString = arrayOfString;
@@ -91,7 +93,6 @@ public List> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("array_array_of_integer")
public void setArrayArrayOfInteger(List> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
@@ -120,7 +121,6 @@ public ArrayTestDto addArrayArrayOfModelItem(List<@Valid ReadOnlyFirstDto> array
return arrayArrayOfModel;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("array_array_of_model")
public void setArrayArrayOfModel(List> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java
index d6dbc67f2d23..0157f3f90a5e 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/BigCatDto.java
@@ -72,6 +72,7 @@ public static KindEnum fromValue(String value) {
}
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable KindEnum kind;
public BigCatDto() {
@@ -93,7 +94,6 @@ public BigCatDto kind(@Nullable KindEnum kind) {
return kind;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("kind")
public void setKind(@Nullable KindEnum kind) {
this.kind = kind;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java
index 3e334c63cc44..b8cd114ab05d 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CapitalizationDto.java
@@ -27,21 +27,27 @@
public class CapitalizationDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String smallCamel;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String capitalCamel;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String smallSnake;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String capitalSnake;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String scAETHFlowPoints;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String ATT_NAME;
public CapitalizationDto smallCamel(@Nullable String smallCamel) {
@@ -59,7 +65,6 @@ public CapitalizationDto smallCamel(@Nullable String smallCamel) {
return smallCamel;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("smallCamel")
public void setSmallCamel(@Nullable String smallCamel) {
this.smallCamel = smallCamel;
@@ -80,7 +85,6 @@ public CapitalizationDto capitalCamel(@Nullable String capitalCamel) {
return capitalCamel;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("CapitalCamel")
public void setCapitalCamel(@Nullable String capitalCamel) {
this.capitalCamel = capitalCamel;
@@ -101,7 +105,6 @@ public CapitalizationDto smallSnake(@Nullable String smallSnake) {
return smallSnake;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("small_Snake")
public void setSmallSnake(@Nullable String smallSnake) {
this.smallSnake = smallSnake;
@@ -122,7 +125,6 @@ public CapitalizationDto capitalSnake(@Nullable String capitalSnake) {
return capitalSnake;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("Capital_Snake")
public void setCapitalSnake(@Nullable String capitalSnake) {
this.capitalSnake = capitalSnake;
@@ -143,7 +145,6 @@ public CapitalizationDto scAETHFlowPoints(@Nullable String scAETHFlowPoints) {
return scAETHFlowPoints;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("SCA_ETH_Flow_Points")
public void setScAETHFlowPoints(@Nullable String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
@@ -164,7 +165,6 @@ public CapitalizationDto ATT_NAME(@Nullable String ATT_NAME) {
return ATT_NAME;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("ATT_NAME")
public void setATTNAME(@Nullable String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java
index cdad439483f3..8cc3ac72727a 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CatDto.java
@@ -39,6 +39,7 @@
public class CatDto extends AnimalDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Boolean declawed;
public CatDto() {
@@ -60,7 +61,6 @@ public CatDto declawed(@Nullable Boolean declawed) {
return declawed;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("declawed")
public void setDeclawed(@Nullable Boolean declawed) {
this.declawed = declawed;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java
index a7974b8569f2..d594d20b7040 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/CategoryDto.java
@@ -27,8 +27,10 @@
public class CategoryDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Long id;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name = "default-name";
public CategoryDto() {
@@ -50,7 +52,6 @@ public CategoryDto id(@Nullable Long id) {
return id;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java
index f51abf8ece42..e8052ff73150 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ChildWithNullableDto.java
@@ -33,6 +33,7 @@
public class ChildWithNullableDto extends ParentWithNullableDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String otherProperty;
public ChildWithNullableDto otherProperty(@Nullable String otherProperty) {
@@ -50,7 +51,6 @@ public ChildWithNullableDto otherProperty(@Nullable String otherProperty) {
return otherProperty;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("otherProperty")
public void setOtherProperty(@Nullable String otherProperty) {
this.otherProperty = otherProperty;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java
index 224945aa2097..4946321f4ff8 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClassModelDto.java
@@ -27,6 +27,7 @@
public class ClassModelDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String propertyClass;
public ClassModelDto propertyClass(@Nullable String propertyClass) {
@@ -44,7 +45,6 @@ public ClassModelDto propertyClass(@Nullable String propertyClass) {
return propertyClass;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("_class")
public void setPropertyClass(@Nullable String propertyClass) {
this.propertyClass = propertyClass;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java
index d56f7d0b101d..d1e32d687f45 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ClientDto.java
@@ -27,6 +27,7 @@
public class ClientDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String client;
public ClientDto client(@Nullable String client) {
@@ -44,7 +45,6 @@ public ClientDto client(@Nullable String client) {
return client;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("client")
public void setClient(@Nullable String client) {
this.client = client;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java
index b28ffec6be94..b5627e929b6b 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ContainerDefaultValueDto.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
@@ -28,8 +29,10 @@ public class ContainerDefaultValueDto {
private @Nullable List nullableArray;
+ @JsonInclude(JsonInclude.Include.ALWAYS)
private List nullableRequiredArray;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List requiredArray = new ArrayList<>();
private @Nullable List nullableArrayWithDefault = new ArrayList<>(Arrays.asList("foo", "bar"));
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java
index 24cf4c298157..f5208d6b9613 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/DogDto.java
@@ -32,6 +32,7 @@
public class DogDto extends AnimalDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String breed;
public DogDto() {
@@ -53,7 +54,6 @@ public DogDto breed(@Nullable String breed) {
return breed;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("breed")
public void setBreed(@Nullable String breed) {
this.breed = breed;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java
index 77c896e6f7bb..1a573e6b8d0e 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumArraysDto.java
@@ -66,6 +66,7 @@ public static JustSymbolEnum fromValue(String value) {
}
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable JustSymbolEnum justSymbol;
/**
@@ -104,6 +105,7 @@ public static ArrayEnumEnum fromValue(String value) {
}
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List arrayEnum = new ArrayList<>();
public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) {
@@ -121,7 +123,6 @@ public EnumArraysDto justSymbol(@Nullable JustSymbolEnum justSymbol) {
return justSymbol;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("just_symbol")
public void setJustSymbol(@Nullable JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
@@ -150,7 +151,6 @@ public List getArrayEnum() {
return arrayEnum;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("array_enum")
public void setArrayEnum(List arrayEnum) {
this.arrayEnum = arrayEnum;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java
index f94de0c9c545..875ed5bc644b 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/EnumTestDto.java
@@ -66,6 +66,7 @@ public static EnumStringEnum fromValue(String value) {
}
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable EnumStringEnum enumString;
/**
@@ -105,6 +106,7 @@ public static EnumStringRequiredEnum fromValue(String value) {
}
}
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private EnumStringRequiredEnum enumStringRequired;
/**
@@ -143,6 +145,7 @@ public static EnumIntegerEnum fromValue(Integer value) {
}
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable EnumIntegerEnum enumInteger;
/**
@@ -181,9 +184,11 @@ public static EnumNumberEnum fromValue(Double value) {
}
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable EnumNumberEnum enumNumber;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable OuterEnumDto outerEnum;
public EnumTestDto() {
@@ -205,7 +210,6 @@ public EnumTestDto enumString(@Nullable EnumStringEnum enumString) {
return enumString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("enum_string")
public void setEnumString(@Nullable EnumStringEnum enumString) {
this.enumString = enumString;
@@ -246,7 +250,6 @@ public EnumTestDto enumInteger(@Nullable EnumIntegerEnum enumInteger) {
return enumInteger;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("enum_integer")
public void setEnumInteger(@Nullable EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
@@ -267,7 +270,6 @@ public EnumTestDto enumNumber(@Nullable EnumNumberEnum enumNumber) {
return enumNumber;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("enum_number")
public void setEnumNumber(@Nullable EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
@@ -288,7 +290,6 @@ public EnumTestDto outerEnum(@Nullable OuterEnumDto outerEnum) {
return outerEnum;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("outerEnum")
public void setOuterEnum(@Nullable OuterEnumDto outerEnum) {
this.outerEnum = outerEnum;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java
index 8d754b6d329e..aa14224caf89 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileDto.java
@@ -27,6 +27,7 @@
public class FileDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String sourceURI;
public FileDto sourceURI(@Nullable String sourceURI) {
@@ -44,7 +45,6 @@ public FileDto sourceURI(@Nullable String sourceURI) {
return sourceURI;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("sourceURI")
public void setSourceURI(@Nullable String sourceURI) {
this.sourceURI = sourceURI;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java
index e64265eb2f4c..158f346707f0 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FileSchemaTestClassDto.java
@@ -31,9 +31,11 @@
public class FileSchemaTestClassDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable FileDto file;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List<@Valid FileDto> files = new ArrayList<>();
public FileSchemaTestClassDto file(@Nullable FileDto file) {
@@ -51,7 +53,6 @@ public FileSchemaTestClassDto file(@Nullable FileDto file) {
return file;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("file")
public void setFile(@Nullable FileDto file) {
this.file = file;
@@ -80,7 +81,6 @@ public FileSchemaTestClassDto addFilesItem(FileDto filesItem) {
return files;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("files")
public void setFiles(List<@Valid FileDto> files) {
this.files = files;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java
index e6c0613fa656..841e6c4ff31c 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/FormatTestDto.java
@@ -33,43 +33,57 @@
public class FormatTestDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer integer;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer int32;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Long int64;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal number;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Float _float;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Double _double;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String string;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private byte[] _byte;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable org.springframework.core.io.Resource binary;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
private LocalDate date;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private @Nullable OffsetDateTime dateTime;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable UUID uuid;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String password;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable BigDecimal bigDecimal;
public FormatTestDto() {
@@ -93,7 +107,6 @@ public FormatTestDto integer(@Nullable Integer integer) {
return integer;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("integer")
public void setInteger(@Nullable Integer integer) {
this.integer = integer;
@@ -116,7 +129,6 @@ public FormatTestDto int32(@Nullable Integer int32) {
return int32;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("int32")
public void setInt32(@Nullable Integer int32) {
this.int32 = int32;
@@ -137,7 +149,6 @@ public FormatTestDto int64(@Nullable Long int64) {
return int64;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("int64")
public void setInt64(@Nullable Long int64) {
this.int64 = int64;
@@ -182,7 +193,6 @@ public FormatTestDto _float(@Nullable Float _float) {
return _float;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("float")
public void setFloat(@Nullable Float _float) {
this._float = _float;
@@ -205,7 +215,6 @@ public FormatTestDto _double(@Nullable Double _double) {
return _double;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("double")
public void setDouble(@Nullable Double _double) {
this._double = _double;
@@ -226,7 +235,6 @@ public FormatTestDto string(@Nullable String string) {
return string;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("string")
public void setString(@Nullable String string) {
this.string = string;
@@ -267,7 +275,6 @@ public FormatTestDto binary(@Nullable org.springframework.core.io.Resource binar
return binary;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("binary")
public void setBinary(@Nullable org.springframework.core.io.Resource binary) {
this.binary = binary;
@@ -308,7 +315,6 @@ public FormatTestDto dateTime(@Nullable OffsetDateTime dateTime) {
return dateTime;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("dateTime")
public void setDateTime(@Nullable OffsetDateTime dateTime) {
this.dateTime = dateTime;
@@ -329,7 +335,6 @@ public FormatTestDto uuid(@Nullable UUID uuid) {
return uuid;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("uuid")
public void setUuid(@Nullable UUID uuid) {
this.uuid = uuid;
@@ -370,7 +375,6 @@ public FormatTestDto bigDecimal(@Nullable BigDecimal bigDecimal) {
return bigDecimal;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("BigDecimal")
public void setBigDecimal(@Nullable BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java
index 7f1ec148d734..a4d5ad3f5be1 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/HasOnlyReadOnlyDto.java
@@ -27,9 +27,11 @@
public class HasOnlyReadOnlyDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String bar;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String foo;
public HasOnlyReadOnlyDto bar(@Nullable String bar) {
@@ -47,7 +49,6 @@ public HasOnlyReadOnlyDto bar(@Nullable String bar) {
return bar;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("bar")
public void setBar(@Nullable String bar) {
this.bar = bar;
@@ -68,7 +69,6 @@ public HasOnlyReadOnlyDto foo(@Nullable String foo) {
return foo;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("foo")
public void setFoo(@Nullable String foo) {
this.foo = foo;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java
index f81d7e91fa7a..6d00c022246a 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ListDto.java
@@ -27,6 +27,7 @@
public class ListDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String _123list;
public ListDto _123list(@Nullable String _123list) {
@@ -44,7 +45,6 @@ public ListDto _123list(@Nullable String _123list) {
return _123list;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("123-list")
public void set123list(@Nullable String _123list) {
this._123list = _123list;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java
index 09940c4522d0..5cf480833005 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MapTestDto.java
@@ -30,6 +30,7 @@
public class MapTestDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map> mapMapOfString = new HashMap<>();
/**
@@ -68,12 +69,15 @@ public static InnerEnum fromValue(String value) {
}
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map mapOfEnumString = new HashMap<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map directMap = new HashMap<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map indirectMap = new HashMap<>();
public MapTestDto mapMapOfString(Map> mapMapOfString) {
@@ -99,7 +103,6 @@ public Map> getMapMapOfString() {
return mapMapOfString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("map_map_of_string")
public void setMapMapOfString(Map> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
@@ -128,7 +131,6 @@ public Map getMapOfEnumString() {
return mapOfEnumString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("map_of_enum_string")
public void setMapOfEnumString(Map mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
@@ -157,7 +159,6 @@ public Map getDirectMap() {
return directMap;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("direct_map")
public void setDirectMap(Map directMap) {
this.directMap = directMap;
@@ -186,7 +187,6 @@ public Map getIndirectMap() {
return indirectMap;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("indirect_map")
public void setIndirectMap(Map indirectMap) {
this.indirectMap = indirectMap;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java
index e3ffa8984cf9..900a1ee469b4 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClassDto.java
@@ -33,13 +33,16 @@
public class MixedPropertiesAndAdditionalPropertiesClassDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable UUID uuid;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private @Nullable OffsetDateTime dateTime;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Map map = new HashMap<>();
public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid) {
@@ -57,7 +60,6 @@ public MixedPropertiesAndAdditionalPropertiesClassDto uuid(@Nullable UUID uuid)
return uuid;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("uuid")
public void setUuid(@Nullable UUID uuid) {
this.uuid = uuid;
@@ -78,7 +80,6 @@ public MixedPropertiesAndAdditionalPropertiesClassDto dateTime(@Nullable OffsetD
return dateTime;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("dateTime")
public void setDateTime(@Nullable OffsetDateTime dateTime) {
this.dateTime = dateTime;
@@ -107,7 +108,6 @@ public Map getMap() {
return map;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("map")
public void setMap(Map map) {
this.map = map;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java
index 68ab43312e9a..f88e19f2aa90 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/Model200ResponseDto.java
@@ -27,9 +27,11 @@
public class Model200ResponseDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer name;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String propertyClass;
public Model200ResponseDto name(@Nullable Integer name) {
@@ -47,7 +49,6 @@ public Model200ResponseDto name(@Nullable Integer name) {
return name;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name")
public void setName(@Nullable Integer name) {
this.name = name;
@@ -68,7 +69,6 @@ public Model200ResponseDto propertyClass(@Nullable String propertyClass) {
return propertyClass;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("class")
public void setPropertyClass(@Nullable String propertyClass) {
this.propertyClass = propertyClass;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java
index 809f87f431c2..3ef8f8bb33c2 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NameDto.java
@@ -26,15 +26,19 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class NameDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer name;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer snakeCase;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String property;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer _123number;
public NameDto() {
@@ -76,7 +80,6 @@ public NameDto snakeCase(@Nullable Integer snakeCase) {
return snakeCase;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("snake_case")
public void setSnakeCase(@Nullable Integer snakeCase) {
this.snakeCase = snakeCase;
@@ -97,7 +100,6 @@ public NameDto property(@Nullable String property) {
return property;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("property")
public void setProperty(@Nullable String property) {
this.property = property;
@@ -118,7 +120,6 @@ public NameDto _123number(@Nullable Integer _123number) {
return _123number;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("123Number")
public void set123number(@Nullable Integer _123number) {
this._123number = _123number;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java
index 38d2fe30ad04..34b93588f32c 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/NumberOnlyDto.java
@@ -28,6 +28,7 @@
public class NumberOnlyDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable BigDecimal justNumber;
public NumberOnlyDto justNumber(@Nullable BigDecimal justNumber) {
@@ -45,7 +46,6 @@ public NumberOnlyDto justNumber(@Nullable BigDecimal justNumber) {
return justNumber;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("JustNumber")
public void setJustNumber(@Nullable BigDecimal justNumber) {
this.justNumber = justNumber;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java
index 10749eefcf28..08c1defb229f 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OrderDto.java
@@ -30,15 +30,19 @@
public class OrderDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Long id;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Long petId;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer quantity;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
private @Nullable OffsetDateTime shipDate;
@@ -80,9 +84,11 @@ public static StatusEnum fromValue(String value) {
}
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable StatusEnum status;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private Boolean complete = false;
public OrderDto id(@Nullable Long id) {
@@ -100,7 +106,6 @@ public OrderDto id(@Nullable Long id) {
return id;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
@@ -121,7 +126,6 @@ public OrderDto petId(@Nullable Long petId) {
return petId;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("petId")
public void setPetId(@Nullable Long petId) {
this.petId = petId;
@@ -142,7 +146,6 @@ public OrderDto quantity(@Nullable Integer quantity) {
return quantity;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("quantity")
public void setQuantity(@Nullable Integer quantity) {
this.quantity = quantity;
@@ -163,7 +166,6 @@ public OrderDto shipDate(@Nullable OffsetDateTime shipDate) {
return shipDate;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("shipDate")
public void setShipDate(@Nullable OffsetDateTime shipDate) {
this.shipDate = shipDate;
@@ -184,7 +186,6 @@ public OrderDto status(@Nullable StatusEnum status) {
return status;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("status")
public void setStatus(@Nullable StatusEnum status) {
this.status = status;
@@ -205,7 +206,6 @@ public Boolean getComplete() {
return complete;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("complete")
public void setComplete(Boolean complete) {
this.complete = complete;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java
index ef36d8f2150d..ec6558982ce0 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/OuterCompositeDto.java
@@ -28,12 +28,15 @@
public class OuterCompositeDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable BigDecimal myNumber;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String myString;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Boolean myBoolean;
public OuterCompositeDto myNumber(@Nullable BigDecimal myNumber) {
@@ -51,7 +54,6 @@ public OuterCompositeDto myNumber(@Nullable BigDecimal myNumber) {
return myNumber;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("my_number")
public void setMyNumber(@Nullable BigDecimal myNumber) {
this.myNumber = myNumber;
@@ -72,7 +74,6 @@ public OuterCompositeDto myString(@Nullable String myString) {
return myString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("my_string")
public void setMyString(@Nullable String myString) {
this.myString = myString;
@@ -93,7 +94,6 @@ public OuterCompositeDto myBoolean(@Nullable Boolean myBoolean) {
return myBoolean;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("my_boolean")
public void setMyBoolean(@Nullable Boolean myBoolean) {
this.myBoolean = myBoolean;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java
index 624aa64de1f3..e28ac8d9ab82 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ParentWithNullableDto.java
@@ -72,6 +72,7 @@ public static TypeEnum fromValue(String value) {
}
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable TypeEnum type;
private @Nullable String nullableProperty = null;
@@ -91,7 +92,6 @@ public ParentWithNullableDto type(@Nullable TypeEnum type) {
return type;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("type")
public void setType(@Nullable TypeEnum type) {
this.type = type;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java
index 30524a3fe8d0..9131504ef497 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/PetDto.java
@@ -36,16 +36,21 @@
public class PetDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Long id;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable CategoryDto category;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Set photoUrls = new LinkedHashSet<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List<@Valid TagDto> tags = new ArrayList<>();
/**
@@ -86,6 +91,7 @@ public static StatusEnum fromValue(String value) {
}
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
@Deprecated
private @Nullable StatusEnum status;
@@ -108,7 +114,6 @@ public PetDto id(@Nullable Long id) {
return id;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
@@ -129,7 +134,6 @@ public PetDto category(@Nullable CategoryDto category) {
return category;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("category")
public void setCategory(@Nullable CategoryDto category) {
this.category = category;
@@ -207,7 +211,6 @@ public PetDto addTagsItem(TagDto tagsItem) {
return tags;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("tags")
public void setTags(List<@Valid TagDto> tags) {
this.tags = tags;
@@ -233,7 +236,6 @@ public PetDto status(@Nullable StatusEnum status) {
/**
* @deprecated
*/
- @JsonSetter(nulls = Nulls.SKIP)
@Deprecated
@JsonProperty("status")
public void setStatus(@Nullable StatusEnum status) {
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java
index d2e84b1d47e6..0038c0006934 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReadOnlyFirstDto.java
@@ -27,9 +27,11 @@
public class ReadOnlyFirstDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String bar;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String baz;
public ReadOnlyFirstDto bar(@Nullable String bar) {
@@ -47,7 +49,6 @@ public ReadOnlyFirstDto bar(@Nullable String bar) {
return bar;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("bar")
public void setBar(@Nullable String bar) {
this.bar = bar;
@@ -68,7 +69,6 @@ public ReadOnlyFirstDto baz(@Nullable String baz) {
return baz;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("baz")
public void setBaz(@Nullable String baz) {
this.baz = baz;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java
index faa3512a89df..540124366238 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ResponseObjectWithDifferentFieldNamesDto.java
@@ -27,15 +27,19 @@
public class ResponseObjectWithDifferentFieldNamesDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String normalPropertyName;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String UPPER_CASE_PROPERTY_SNAKE;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String lowerCasePropertyDashes;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String propertyNameWithSpaces;
public ResponseObjectWithDifferentFieldNamesDto normalPropertyName(@Nullable String normalPropertyName) {
@@ -53,7 +57,6 @@ public ResponseObjectWithDifferentFieldNamesDto normalPropertyName(@Nullable Str
return normalPropertyName;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("normalPropertyName")
public void setNormalPropertyName(@Nullable String normalPropertyName) {
this.normalPropertyName = normalPropertyName;
@@ -74,7 +77,6 @@ public ResponseObjectWithDifferentFieldNamesDto UPPER_CASE_PROPERTY_SNAKE(@Nulla
return UPPER_CASE_PROPERTY_SNAKE;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("UPPER_CASE_PROPERTY_SNAKE")
public void setUPPERCASEPROPERTYSNAKE(@Nullable String UPPER_CASE_PROPERTY_SNAKE) {
this.UPPER_CASE_PROPERTY_SNAKE = UPPER_CASE_PROPERTY_SNAKE;
@@ -95,7 +97,6 @@ public ResponseObjectWithDifferentFieldNamesDto lowerCasePropertyDashes(@Nullabl
return lowerCasePropertyDashes;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("lower-case-property-dashes")
public void setLowerCasePropertyDashes(@Nullable String lowerCasePropertyDashes) {
this.lowerCasePropertyDashes = lowerCasePropertyDashes;
@@ -116,7 +117,6 @@ public ResponseObjectWithDifferentFieldNamesDto propertyNameWithSpaces(@Nullable
return propertyNameWithSpaces;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("property name with spaces")
public void setPropertyNameWithSpaces(@Nullable String propertyNameWithSpaces) {
this.propertyNameWithSpaces = propertyNameWithSpaces;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java
index 9d4d479f06ab..d5cca17c65a9 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/ReturnDto.java
@@ -27,6 +27,7 @@
public class ReturnDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer _return;
public ReturnDto _return(@Nullable Integer _return) {
@@ -44,7 +45,6 @@ public ReturnDto _return(@Nullable Integer _return) {
return _return;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("return")
public void setReturn(@Nullable Integer _return) {
this._return = _return;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java
index 46736897a1ac..bed961337881 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/SpecialModelNameDto.java
@@ -27,6 +27,7 @@
public class SpecialModelNameDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Long $specialPropertyName;
public SpecialModelNameDto $specialPropertyName(@Nullable Long $specialPropertyName) {
@@ -44,7 +45,6 @@ public class SpecialModelNameDto {
return $specialPropertyName;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("$special[property.name]")
public void set$SpecialPropertyName(@Nullable Long $specialPropertyName) {
this.$specialPropertyName = $specialPropertyName;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java
index 0580a3e0b343..a3bed1aa2cab 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TagDto.java
@@ -27,9 +27,11 @@
public class TagDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Long id;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String name;
public TagDto id(@Nullable Long id) {
@@ -47,7 +49,6 @@ public TagDto id(@Nullable Long id) {
return id;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
@@ -68,7 +69,6 @@ public TagDto name(@Nullable String name) {
return name;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java
index e92f8c79ef5f..c0325225555f 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderDefaultDto.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
@@ -27,14 +28,19 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderDefaultDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem = "what";
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem = new BigDecimal("1.234");
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem = -2;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem = true;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3));
public TypeHolderDefaultDto() {
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java
index 0400294f91bc..522e6a5f3520 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/TypeHolderExampleDto.java
@@ -2,6 +2,7 @@
import java.net.URI;
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
@@ -27,16 +28,22 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class TypeHolderExampleDto {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String stringItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private BigDecimal numberItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Float floatItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Integer integerItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean boolItem;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List arrayItem = new ArrayList<>();
public TypeHolderExampleDto() {
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java
index 815716c0500e..8f158989a646 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/UserDto.java
@@ -27,27 +27,35 @@
public class UserDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Long id;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String username;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String firstName;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String lastName;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String email;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String password;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String phone;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer userStatus;
public UserDto id(@Nullable Long id) {
@@ -65,7 +73,6 @@ public UserDto id(@Nullable Long id) {
return id;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("id")
public void setId(@Nullable Long id) {
this.id = id;
@@ -86,7 +93,6 @@ public UserDto username(@Nullable String username) {
return username;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("username")
public void setUsername(@Nullable String username) {
this.username = username;
@@ -107,7 +113,6 @@ public UserDto firstName(@Nullable String firstName) {
return firstName;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("firstName")
public void setFirstName(@Nullable String firstName) {
this.firstName = firstName;
@@ -128,7 +133,6 @@ public UserDto lastName(@Nullable String lastName) {
return lastName;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("lastName")
public void setLastName(@Nullable String lastName) {
this.lastName = lastName;
@@ -149,7 +153,6 @@ public UserDto email(@Nullable String email) {
return email;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("email")
public void setEmail(@Nullable String email) {
this.email = email;
@@ -170,7 +173,6 @@ public UserDto password(@Nullable String password) {
return password;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("password")
public void setPassword(@Nullable String password) {
this.password = password;
@@ -191,7 +193,6 @@ public UserDto phone(@Nullable String phone) {
return phone;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("phone")
public void setPhone(@Nullable String phone) {
this.phone = phone;
@@ -212,7 +213,6 @@ public UserDto userStatus(@Nullable Integer userStatus) {
return userStatus;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("userStatus")
public void setUserStatus(@Nullable Integer userStatus) {
this.userStatus = userStatus;
diff --git a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java
index d018521c12a3..4f0e84c89802 100644
--- a/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java
+++ b/samples/client/petstore/spring-http-interface-springboot-4/src/main/java/org/openapitools/model/XmlItemDto.java
@@ -31,90 +31,119 @@
public class XmlItemDto {
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String attributeString;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable BigDecimal attributeNumber;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer attributeInteger;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Boolean attributeBoolean;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List wrappedArray = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String nameString;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable BigDecimal nameNumber;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer nameInteger;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Boolean nameBoolean;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List nameArray = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List nameWrappedArray = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String prefixString;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable BigDecimal prefixNumber;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer prefixInteger;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Boolean prefixBoolean;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List prefixArray = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List prefixWrappedArray = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String namespaceString;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable BigDecimal namespaceNumber;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer namespaceInteger;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Boolean namespaceBoolean;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List namespaceArray = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List namespaceWrappedArray = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable String prefixNsString;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable BigDecimal prefixNsNumber;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Integer prefixNsInteger;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private @Nullable Boolean prefixNsBoolean;
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List prefixNsArray = new ArrayList<>();
@JsonInclude(JsonInclude.Include.NON_NULL)
+ @JsonSetter(nulls = Nulls.SKIP)
private List prefixNsWrappedArray = new ArrayList<>();
public XmlItemDto attributeString(@Nullable String attributeString) {
@@ -132,7 +161,6 @@ public XmlItemDto attributeString(@Nullable String attributeString) {
return attributeString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("attribute_string")
public void setAttributeString(@Nullable String attributeString) {
this.attributeString = attributeString;
@@ -153,7 +181,6 @@ public XmlItemDto attributeNumber(@Nullable BigDecimal attributeNumber) {
return attributeNumber;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("attribute_number")
public void setAttributeNumber(@Nullable BigDecimal attributeNumber) {
this.attributeNumber = attributeNumber;
@@ -174,7 +201,6 @@ public XmlItemDto attributeInteger(@Nullable Integer attributeInteger) {
return attributeInteger;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("attribute_integer")
public void setAttributeInteger(@Nullable Integer attributeInteger) {
this.attributeInteger = attributeInteger;
@@ -195,7 +221,6 @@ public XmlItemDto attributeBoolean(@Nullable Boolean attributeBoolean) {
return attributeBoolean;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("attribute_boolean")
public void setAttributeBoolean(@Nullable Boolean attributeBoolean) {
this.attributeBoolean = attributeBoolean;
@@ -224,7 +249,6 @@ public List getWrappedArray() {
return wrappedArray;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("wrapped_array")
public void setWrappedArray(List wrappedArray) {
this.wrappedArray = wrappedArray;
@@ -245,7 +269,6 @@ public XmlItemDto nameString(@Nullable String nameString) {
return nameString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name_string")
public void setNameString(@Nullable String nameString) {
this.nameString = nameString;
@@ -266,7 +289,6 @@ public XmlItemDto nameNumber(@Nullable BigDecimal nameNumber) {
return nameNumber;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name_number")
public void setNameNumber(@Nullable BigDecimal nameNumber) {
this.nameNumber = nameNumber;
@@ -287,7 +309,6 @@ public XmlItemDto nameInteger(@Nullable Integer nameInteger) {
return nameInteger;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name_integer")
public void setNameInteger(@Nullable Integer nameInteger) {
this.nameInteger = nameInteger;
@@ -308,7 +329,6 @@ public XmlItemDto nameBoolean(@Nullable Boolean nameBoolean) {
return nameBoolean;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name_boolean")
public void setNameBoolean(@Nullable Boolean nameBoolean) {
this.nameBoolean = nameBoolean;
@@ -337,7 +357,6 @@ public List getNameArray() {
return nameArray;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name_array")
public void setNameArray(List nameArray) {
this.nameArray = nameArray;
@@ -366,7 +385,6 @@ public List getNameWrappedArray() {
return nameWrappedArray;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("name_wrapped_array")
public void setNameWrappedArray(List nameWrappedArray) {
this.nameWrappedArray = nameWrappedArray;
@@ -387,7 +405,6 @@ public XmlItemDto prefixString(@Nullable String prefixString) {
return prefixString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_string")
public void setPrefixString(@Nullable String prefixString) {
this.prefixString = prefixString;
@@ -408,7 +425,6 @@ public XmlItemDto prefixNumber(@Nullable BigDecimal prefixNumber) {
return prefixNumber;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_number")
public void setPrefixNumber(@Nullable BigDecimal prefixNumber) {
this.prefixNumber = prefixNumber;
@@ -429,7 +445,6 @@ public XmlItemDto prefixInteger(@Nullable Integer prefixInteger) {
return prefixInteger;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_integer")
public void setPrefixInteger(@Nullable Integer prefixInteger) {
this.prefixInteger = prefixInteger;
@@ -450,7 +465,6 @@ public XmlItemDto prefixBoolean(@Nullable Boolean prefixBoolean) {
return prefixBoolean;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_boolean")
public void setPrefixBoolean(@Nullable Boolean prefixBoolean) {
this.prefixBoolean = prefixBoolean;
@@ -479,7 +493,6 @@ public List getPrefixArray() {
return prefixArray;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_array")
public void setPrefixArray(List prefixArray) {
this.prefixArray = prefixArray;
@@ -508,7 +521,6 @@ public List getPrefixWrappedArray() {
return prefixWrappedArray;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_wrapped_array")
public void setPrefixWrappedArray(List prefixWrappedArray) {
this.prefixWrappedArray = prefixWrappedArray;
@@ -529,7 +541,6 @@ public XmlItemDto namespaceString(@Nullable String namespaceString) {
return namespaceString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("namespace_string")
public void setNamespaceString(@Nullable String namespaceString) {
this.namespaceString = namespaceString;
@@ -550,7 +561,6 @@ public XmlItemDto namespaceNumber(@Nullable BigDecimal namespaceNumber) {
return namespaceNumber;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("namespace_number")
public void setNamespaceNumber(@Nullable BigDecimal namespaceNumber) {
this.namespaceNumber = namespaceNumber;
@@ -571,7 +581,6 @@ public XmlItemDto namespaceInteger(@Nullable Integer namespaceInteger) {
return namespaceInteger;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("namespace_integer")
public void setNamespaceInteger(@Nullable Integer namespaceInteger) {
this.namespaceInteger = namespaceInteger;
@@ -592,7 +601,6 @@ public XmlItemDto namespaceBoolean(@Nullable Boolean namespaceBoolean) {
return namespaceBoolean;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("namespace_boolean")
public void setNamespaceBoolean(@Nullable Boolean namespaceBoolean) {
this.namespaceBoolean = namespaceBoolean;
@@ -621,7 +629,6 @@ public List getNamespaceArray() {
return namespaceArray;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("namespace_array")
public void setNamespaceArray(List namespaceArray) {
this.namespaceArray = namespaceArray;
@@ -650,7 +657,6 @@ public List getNamespaceWrappedArray() {
return namespaceWrappedArray;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("namespace_wrapped_array")
public void setNamespaceWrappedArray(List namespaceWrappedArray) {
this.namespaceWrappedArray = namespaceWrappedArray;
@@ -671,7 +677,6 @@ public XmlItemDto prefixNsString(@Nullable String prefixNsString) {
return prefixNsString;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_ns_string")
public void setPrefixNsString(@Nullable String prefixNsString) {
this.prefixNsString = prefixNsString;
@@ -692,7 +697,6 @@ public XmlItemDto prefixNsNumber(@Nullable BigDecimal prefixNsNumber) {
return prefixNsNumber;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_ns_number")
public void setPrefixNsNumber(@Nullable BigDecimal prefixNsNumber) {
this.prefixNsNumber = prefixNsNumber;
@@ -713,7 +717,6 @@ public XmlItemDto prefixNsInteger(@Nullable Integer prefixNsInteger) {
return prefixNsInteger;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_ns_integer")
public void setPrefixNsInteger(@Nullable Integer prefixNsInteger) {
this.prefixNsInteger = prefixNsInteger;
@@ -734,7 +737,6 @@ public XmlItemDto prefixNsBoolean(@Nullable Boolean prefixNsBoolean) {
return prefixNsBoolean;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_ns_boolean")
public void setPrefixNsBoolean(@Nullable Boolean prefixNsBoolean) {
this.prefixNsBoolean = prefixNsBoolean;
@@ -763,7 +765,6 @@ public List getPrefixNsArray() {
return prefixNsArray;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_ns_array")
public void setPrefixNsArray(List prefixNsArray) {
this.prefixNsArray = prefixNsArray;
@@ -792,7 +793,6 @@ public List getPrefixNsWrappedArray() {
return prefixNsWrappedArray;
}
- @JsonSetter(nulls = Nulls.SKIP)
@JsonProperty("prefix_ns_wrapped_array")
public void setPrefixNsWrappedArray(List prefixNsWrappedArray) {
this.prefixNsWrappedArray = prefixNsWrappedArray;
diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
index 5daca86cbb74..a3e051349288 100644
--- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
+++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/AdditionalPropertiesClass.java
@@ -57,7 +57,6 @@ public class AdditionalPropertiesClass {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Object anytype1;
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable anytype2 = JsonNullable.undefined();
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java
index 2e8e804a79d3..e4e0790b3e92 100644
--- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java
+++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Animal.java
@@ -37,6 +37,7 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class Animal {
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String className;
@JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java
index 08c3a1d9091a..3455dcf8b80b 100644
--- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java
+++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Category.java
@@ -26,6 +26,7 @@ public class Category {
@JsonInclude(JsonInclude.Include.NON_NULL)
private @Nullable Long id;
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private String name = "default-name";
public Category() {
diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java
index 09216052292e..219aeb0cd0ed 100644
--- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java
+++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/ContainerDefaultValue.java
@@ -28,14 +28,14 @@
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.25.0-SNAPSHOT")
public class ContainerDefaultValue {
- @JsonInclude(JsonInclude.Include.NON_ABSENT)
private JsonNullable> nullableArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.ALWAYS)
private JsonNullable> nullableRequiredArray = JsonNullable.>undefined();
+ @JsonInclude(JsonInclude.Include.NON_NULL)
private List