From 2d4f4a9a130658e6d18085ec30524f0dcd1eda77 Mon Sep 17 00:00:00 2001 From: Burak KALAYCI Date: Fri, 14 Aug 2026 12:08:07 +0300 Subject: [PATCH 1/3] [Java][Spring] Annotate deprecated fluent model setters with @Deprecated Fluent setters and collection helpers generated from deprecated schema properties now emit @Deprecated, matching getters, setters, and nested builder methods. Fixes #24704 --- .../main/resources/JavaSpring/pojo.mustache | 18 ++++++++++ .../java/spring/SpringCodegenTest.java | 35 +++++++++++++++++++ .../resources/3_0/spring/issue_24704.yaml | 35 +++++++++++++++++++ .../main/java/org/openapitools/model/Pet.java | 2 ++ .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../java/org/openapitools/model/PetDto.java | 1 + .../java/org/openapitools/model/PetDto.java | 1 + .../java/org/openapitools/model/PetDto.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../java/org/openapitools/model/PetDto.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../java/org/openapitools/model/PetDto.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../java/org/openapitools/model/PetDto.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../main/java/org/openapitools/model/Pet.java | 1 + .../org/openapitools/virtualan/model/Pet.java | 1 + .../model/ObjectWithDeprecatedFieldsDto.java | 4 +++ .../java/org/openapitools/model/PetDto.java | 1 + 50 files changed, 139 insertions(+) create mode 100644 modules/openapi-generator/src/test/resources/3_0/spring/issue_24704.yaml diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index 99dc720a635d..4b53200a3a6a 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -154,6 +154,9 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{^lombok.Data}} {{! begin feature: fluent setter methods }} + {{#deprecated}} + @Deprecated + {{/deprecated}} public {{classname}} {{name}}({{>nullableArgument_chainSetter}} {{name}}) { {{#openApiNullable}} this.{{name}} = {{#isNullable}}JsonNullable.of({{/isNullable}}{{#useOptional}}{{^required}}{{^isNullable}}{{^isContainer}}Optional.of{{#optionalAcceptNullable}}Nullable{{/optionalAcceptNullable}}({{/isContainer}}{{/isNullable}}{{/required}}{{/useOptional}}{{name}}{{#isNullable}}){{/isNullable}}{{#useOptional}}{{^required}}{{^isNullable}}{{^isContainer}}){{/isContainer}}{{/isNullable}}{{/required}}{{/useOptional}}; @@ -165,6 +168,9 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} } {{#isArray}} + {{#deprecated}} + @Deprecated + {{/deprecated}} public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { {{#openApiNullable}} if (this.{{name}} == null{{#isNullable}} || !this.{{name}}.isPresent() || this.{{name}}.get() == null{{/isNullable}}) { @@ -183,6 +189,9 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{/isArray}} {{#isMap}} + {{#deprecated}} + @Deprecated + {{/deprecated}} public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { {{#openApiNullable}} if (this.{{name}} == null{{#isNullable}} || !this.{{name}}.isPresent() || this.{{name}}.get() == null{{/isNullable}}) { @@ -270,12 +279,18 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{^lombok.Setter}} {{! begin feature: fluent setter methods for inherited properties }} + {{#deprecated}} + @Deprecated + {{/deprecated}} public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { super.{{name}}({{name}}); return this; } {{#isArray}} + {{#deprecated}} + @Deprecated + {{/deprecated}} public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { super.add{{nameInPascalCase}}Item({{name}}Item); return this; @@ -283,6 +298,9 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{/isArray}} {{#isMap}} + {{#deprecated}} + @Deprecated + {{/deprecated}} public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { super.put{{nameInPascalCase}}Item(key, {{name}}Item); return this; 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 d959fdcb607a..1b9c43f2c39a 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 @@ -3254,6 +3254,41 @@ public void contractWithDeprecatedEnumGeneratesDeprecatedAnnotation() throws IOE .fileDoesNotContain("@Deprecated"); } + @Test + public void contractWithDeprecatedPropertiesAnnotatesFluentSettersAndCollectionHelpers() throws IOException { + Map output = generateFromContract( + "src/test/resources/3_0/spring/issue_24704.yaml", + SPRING_BOOT, + Map.of(GENERATE_BUILDERS, true) + ); + + JavaFileAssert.assertThat(output.get("Example.java")) + .assertMethod("deprecatedProperty", "String") + .hasAnnotation("Deprecated") + .toFileAssert() + .assertMethod("deprecatedValues") + .hasAnnotation("Deprecated") + .toFileAssert() + .assertMethod("deprecatedMap") + .hasAnnotation("Deprecated") + .toFileAssert() + .assertMethod("addDeprecatedValuesItem", "String") + .hasAnnotation("Deprecated") + .toFileAssert() + .assertMethod("putDeprecatedMapItem", "String", "String") + .hasAnnotation("Deprecated") + .toFileAssert() + .assertMethod("currentProperty", "String") + .doesNotHaveAnnotation("Deprecated") + .toFileAssert() + .assertInnerClass("Builder") + .assertMethod("deprecatedProperty", "String") + .hasAnnotation("Deprecated") + .toInnerClassAssert() + .assertMethod("currentProperty", "String") + .doesNotHaveAnnotation("Deprecated"); + } + @Test public void contractWithResolvedInnerEnumContainsEnumConverter() throws IOException { File output = Files.createTempDirectory("test").toFile(); diff --git a/modules/openapi-generator/src/test/resources/3_0/spring/issue_24704.yaml b/modules/openapi-generator/src/test/resources/3_0/spring/issue_24704.yaml new file mode 100644 index 000000000000..f1872d6643e8 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/spring/issue_24704.yaml @@ -0,0 +1,35 @@ +openapi: 3.0.3 +info: + title: Deprecated property example + version: 1.0.0 +paths: + /example: + get: + operationId: getExample + responses: + "200": + description: Example response + content: + application/json: + schema: + $ref: "#/components/schemas/Example" +components: + schemas: + Example: + type: object + properties: + currentProperty: + type: string + deprecatedProperty: + type: string + deprecated: true + deprecatedValues: + type: array + deprecated: true + items: + type: string + deprecatedMap: + type: object + deprecated: true + additionalProperties: + type: string 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 cbfefe49d0ce..0dcff6923950 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 @@ -161,11 +161,13 @@ public void setName(JsonNullable name) { this.name = name; } + @Deprecated public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; return this; } + @Deprecated public Pet addPhotoUrlsItem(String photoUrlsItem) { if (this.photoUrls == null) { this.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 dcc9864ef5fa..0f48e4a0591a 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 @@ -221,6 +221,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; 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 dcc9864ef5fa..0f48e4a0591a 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 @@ -221,6 +221,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; 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 aed326d47e76..cd38ca44840e 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 @@ -212,6 +212,7 @@ public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } + @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; return this; 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 5b62a26b9fd8..3c4e9fd6ce0d 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 @@ -211,6 +211,7 @@ public void setTags(List tags) { this.tags = tags; } + @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; return this; 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 364eb0af3c0c..9092e36193c3 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 @@ -212,6 +212,7 @@ public void setTags(List tags) { this.tags = tags; } + @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; return this; 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 aa5696d9edff..7012e5d1f1c9 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 @@ -218,6 +218,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; 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 9e4323f1115c..fa0634c9f6f8 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 @@ -217,6 +217,7 @@ public void setTags(List tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; 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 9e4323f1115c..fa0634c9f6f8 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 @@ -217,6 +217,7 @@ public void setTags(List tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; 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 e9d00a6b6f2d..31305bad2ea9 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 @@ -218,6 +218,7 @@ public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } + @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java index 12be472e2153..0b81ca09f1a8 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java @@ -219,6 +219,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java index 5b62a26b9fd8..3c4e9fd6ce0d 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java @@ -211,6 +211,7 @@ public void setTags(List tags) { this.tags = tags; } + @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java index 1f283da5f8b7..acf4db8f9287 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java @@ -214,6 +214,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(StatusEnum status) { this.status = Optional.ofNullable(status); return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java index dcc9864ef5fa..0f48e4a0591a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java index 988c42ca95f9..a6b9775ded7c 100644 --- a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java @@ -219,6 +219,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index dcc9864ef5fa..0f48e4a0591a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java index dcc9864ef5fa..0f48e4a0591a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java index c5deb2f1e1ee..ebcaf44c57fc 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java @@ -216,6 +216,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index dcc9864ef5fa..0f48e4a0591a 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java index dcc9864ef5fa..0f48e4a0591a 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index dcc9864ef5fa..0f48e4a0591a 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java index dcc9864ef5fa..0f48e4a0591a 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java index adbd3ac4721e..1ad75f928181 100644 --- a/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java @@ -262,6 +262,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java index 69f5479e14e2..c047d2447f5e 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java @@ -261,6 +261,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java index 7f0a042f672f..aab5f8f0a605 100644 --- a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java @@ -267,6 +267,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 2c9687e5a1fb..fb26a4144e77 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 2c9687e5a1fb..fb26a4144e77 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java index 6bc756d1c1e1..301d06212774 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java @@ -214,6 +214,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 2d94237930ba..2b0e4ab05ac5 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -217,6 +217,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java index 2c9687e5a1fb..fb26a4144e77 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index e5a470f46246..82b37f676932 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -229,6 +229,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index 2c9687e5a1fb..fb26a4144e77 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java index 2c9687e5a1fb..fb26a4144e77 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index 2c9687e5a1fb..fb26a4144e77 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java index dcc9864ef5fa..0f48e4a0591a 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 3d98449a58d6..c4919550b0de 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -236,6 +236,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java index b88a12a9449a..0039650dca5a 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java @@ -214,6 +214,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 60155272ecbc..369154920aae 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java index 36dfb19c7c1d..741813641cfb 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java @@ -226,6 +226,7 @@ public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } + @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java index 694d9419602f..ec4d20bedee4 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java @@ -151,6 +151,7 @@ public Pet addTagsItem(Tag tagsItem) { } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java index dcc9864ef5fa..0f48e4a0591a 100644 --- a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java index 2c9687e5a1fb..fb26a4144e77 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 2c9687e5a1fb..fb26a4144e77 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 0f8f2c76f2da..b02427ea235e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(StatusEnum status) { this.status = Optional.ofNullable(status); return this; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index b839dc0b136c..b947ca315535 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -224,6 +224,7 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; return this; diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java index 20fcb7e81930..356d340ba5e0 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java @@ -66,6 +66,7 @@ public void setUuid(@Nullable String uuid) { this.uuid = uuid; } + @Deprecated public ObjectWithDeprecatedFieldsDto id(@Nullable BigDecimal id) { this.id = id; return this; @@ -93,6 +94,7 @@ public void setId(@Nullable BigDecimal id) { this.id = id; } + @Deprecated public ObjectWithDeprecatedFieldsDto deprecatedRef(@Nullable DeprecatedObjectDto deprecatedRef) { this.deprecatedRef = deprecatedRef; return this; @@ -120,11 +122,13 @@ public void setDeprecatedRef(@Nullable DeprecatedObjectDto deprecatedRef) { this.deprecatedRef = deprecatedRef; } + @Deprecated public ObjectWithDeprecatedFieldsDto bars(List bars) { this.bars = bars; return this; } + @Deprecated public ObjectWithDeprecatedFieldsDto addBarsItem(String barsItem) { if (this.bars == null) { this.bars = new ArrayList<>(); diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java index 50a0ab6923f5..0a0344a23c0c 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java @@ -227,6 +227,7 @@ public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } + @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; return this; From 32f8dabe4fcc1ff56959af43f0a06ab05d6a1272 Mon Sep 17 00:00:00 2001 From: Burak KALAYCI Date: Tue, 18 Aug 2026 06:43:03 +0300 Subject: [PATCH 2/3] [Java][Spring] Add @deprecated javadoc on fluent setters Keep generated fluent setters and collection helpers consistent with getters/setters for deprecated properties. --- .../main/resources/JavaSpring/pojo.mustache | 18 ++++++++++++++++++ .../codegen/java/spring/SpringCodegenTest.java | 7 +++++++ .../main/java/org/openapitools/model/Pet.java | 6 ++++++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../java/org/openapitools/model/PetDto.java | 3 +++ .../java/org/openapitools/model/PetDto.java | 3 +++ .../java/org/openapitools/model/PetDto.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../java/org/openapitools/model/PetDto.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../java/org/openapitools/model/PetDto.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../java/org/openapitools/model/PetDto.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../main/java/org/openapitools/model/Pet.java | 3 +++ .../org/openapitools/virtualan/model/Pet.java | 3 +++ .../model/ObjectWithDeprecatedFieldsDto.java | 12 ++++++++++++ .../java/org/openapitools/model/PetDto.java | 3 +++ 49 files changed, 178 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index 4b53200a3a6a..5cd3be04304f 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -155,6 +155,9 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{! begin feature: fluent setter methods }} {{#deprecated}} + /** + * @deprecated + */ @Deprecated {{/deprecated}} public {{classname}} {{name}}({{>nullableArgument_chainSetter}} {{name}}) { @@ -169,6 +172,9 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{#isArray}} {{#deprecated}} + /** + * @deprecated + */ @Deprecated {{/deprecated}} public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { @@ -190,6 +196,9 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{#isMap}} {{#deprecated}} + /** + * @deprecated + */ @Deprecated {{/deprecated}} public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { @@ -280,6 +289,9 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{^lombok.Setter}} {{! begin feature: fluent setter methods for inherited properties }} {{#deprecated}} + /** + * @deprecated + */ @Deprecated {{/deprecated}} public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) { @@ -289,6 +301,9 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{#isArray}} {{#deprecated}} + /** + * @deprecated + */ @Deprecated {{/deprecated}} public {{classname}} add{{nameInPascalCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { @@ -299,6 +314,9 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{#isMap}} {{#deprecated}} + /** + * @deprecated + */ @Deprecated {{/deprecated}} public {{classname}} put{{nameInPascalCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { 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 1b9c43f2c39a..225f6f0cc2ed 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 @@ -3263,6 +3263,13 @@ public void contractWithDeprecatedPropertiesAnnotatesFluentSettersAndCollectionH ); JavaFileAssert.assertThat(output.get("Example.java")) + .fileContains( + " /**\n * @deprecated\n */\n @Deprecated\n public Example deprecatedProperty(", + " /**\n * @deprecated\n */\n @Deprecated\n public Example deprecatedValues(", + " /**\n * @deprecated\n */\n @Deprecated\n public Example addDeprecatedValuesItem(", + " /**\n * @deprecated\n */\n @Deprecated\n public Example deprecatedMap(", + " /**\n * @deprecated\n */\n @Deprecated\n public Example putDeprecatedMapItem(" + ) .assertMethod("deprecatedProperty", "String") .hasAnnotation("Deprecated") .toFileAssert() 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 0dcff6923950..83e4719448a8 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 @@ -161,12 +161,18 @@ public void setName(JsonNullable name) { this.name = name; } + /** + * @deprecated + */ @Deprecated public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; return this; } + /** + * @deprecated + */ @Deprecated public Pet addPhotoUrlsItem(String photoUrlsItem) { if (this.photoUrls == null) { 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 0f48e4a0591a..c887a42c90aa 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 @@ -221,6 +221,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; 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 0f48e4a0591a..c887a42c90aa 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 @@ -221,6 +221,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; 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 cd38ca44840e..03ebfb1cf338 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 @@ -212,6 +212,9 @@ public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; 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 3c4e9fd6ce0d..f495c7209958 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 @@ -211,6 +211,9 @@ public void setTags(List tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; 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 9092e36193c3..cac22ea98e1c 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 @@ -212,6 +212,9 @@ public void setTags(List tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; 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 7012e5d1f1c9..f72e0c8928ee 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 @@ -218,6 +218,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; 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 fa0634c9f6f8..a227eb2c2dab 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 @@ -217,6 +217,9 @@ public void setTags(List tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; 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 fa0634c9f6f8..a227eb2c2dab 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 @@ -217,6 +217,9 @@ public void setTags(List tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; 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 31305bad2ea9..4db2d31e6f25 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 @@ -218,6 +218,9 @@ public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java index 0b81ca09f1a8..bf4de6fa5db9 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java @@ -219,6 +219,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java index 3c4e9fd6ce0d..f495c7209958 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java @@ -211,6 +211,9 @@ public void setTags(List tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java index acf4db8f9287..1c65c26423ed 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java @@ -214,6 +214,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(StatusEnum status) { this.status = Optional.ofNullable(status); diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java index 0f48e4a0591a..c887a42c90aa 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java index a6b9775ded7c..9d5d17a86137 100644 --- a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java @@ -219,6 +219,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(StatusEnum status) { this.status = status; diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index 0f48e4a0591a..c887a42c90aa 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java index 0f48e4a0591a..c887a42c90aa 100644 --- a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java index ebcaf44c57fc..c4ecfb845193 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java @@ -216,6 +216,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index 0f48e4a0591a..c887a42c90aa 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java index 0f48e4a0591a..c887a42c90aa 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index 0f48e4a0591a..c887a42c90aa 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java index 0f48e4a0591a..c887a42c90aa 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java index 1ad75f928181..9734fad43a4c 100644 --- a/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java @@ -262,6 +262,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java index c047d2447f5e..f113030d47aa 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java @@ -261,6 +261,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java index aab5f8f0a605..7c489b1312c5 100644 --- a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java @@ -267,6 +267,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index fb26a4144e77..2f6eb4a6b5ab 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index fb26a4144e77..2f6eb4a6b5ab 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java index 301d06212774..2d3d8fce88fb 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java @@ -214,6 +214,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 2b0e4ab05ac5..4aa77323c010 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -217,6 +217,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java index fb26a4144e77..2f6eb4a6b5ab 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index 82b37f676932..2c42eb819ddf 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -229,6 +229,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index fb26a4144e77..2f6eb4a6b5ab 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java index fb26a4144e77..2f6eb4a6b5ab 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index fb26a4144e77..2f6eb4a6b5ab 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java index 0f48e4a0591a..c887a42c90aa 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index c4919550b0de..3364a8d55449 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -236,6 +236,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java index 0039650dca5a..bbc849dce37d 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java @@ -214,6 +214,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 369154920aae..5bd076bf21d9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java index 741813641cfb..f156c1c317e5 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java @@ -226,6 +226,9 @@ public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java index ec4d20bedee4..871de5ea1e75 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java @@ -151,6 +151,9 @@ public Pet addTagsItem(Tag tagsItem) { } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java index 0f48e4a0591a..c887a42c90aa 100644 --- a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java @@ -221,6 +221,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java index fb26a4144e77..2f6eb4a6b5ab 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index fb26a4144e77..2f6eb4a6b5ab 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index b02427ea235e..25b74727ccfa 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -224,6 +224,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(StatusEnum status) { this.status = Optional.ofNullable(status); diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index b947ca315535..501029312d28 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -224,6 +224,9 @@ public void setTags(List<@Valid Tag> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public Pet status(@Nullable StatusEnum status) { this.status = status; diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java index 356d340ba5e0..a0491698e411 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java @@ -66,6 +66,9 @@ public void setUuid(@Nullable String uuid) { this.uuid = uuid; } + /** + * @deprecated + */ @Deprecated public ObjectWithDeprecatedFieldsDto id(@Nullable BigDecimal id) { this.id = id; @@ -94,6 +97,9 @@ public void setId(@Nullable BigDecimal id) { this.id = id; } + /** + * @deprecated + */ @Deprecated public ObjectWithDeprecatedFieldsDto deprecatedRef(@Nullable DeprecatedObjectDto deprecatedRef) { this.deprecatedRef = deprecatedRef; @@ -122,12 +128,18 @@ public void setDeprecatedRef(@Nullable DeprecatedObjectDto deprecatedRef) { this.deprecatedRef = deprecatedRef; } + /** + * @deprecated + */ @Deprecated public ObjectWithDeprecatedFieldsDto bars(List bars) { this.bars = bars; return this; } + /** + * @deprecated + */ @Deprecated public ObjectWithDeprecatedFieldsDto addBarsItem(String barsItem) { if (this.bars == null) { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java index 0a0344a23c0c..4cdda56930b1 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java @@ -227,6 +227,9 @@ public void setTags(List<@Valid TagDto> tags) { this.tags = tags; } + /** + * @deprecated + */ @Deprecated public PetDto status(@Nullable StatusEnum status) { this.status = status; From 656ac60a16cc4b0311b7fcfa3c28a86fc373c6b2 Mon Sep 17 00:00:00 2001 From: Burak KALAYCI Date: Mon, 24 Aug 2026 09:48:27 +0300 Subject: [PATCH 3/3] [Java][Spring] Add @deprecated tag text on fluent setters Javadoc @deprecated with no text warns on generated models. Use the same "deprecated" wording as the Spring enum templates. --- .../src/main/resources/JavaSpring/pojo.mustache | 14 +++++++------- .../codegen/java/spring/SpringCodegenTest.java | 10 +++++----- .../src/main/java/org/openapitools/model/Pet.java | 6 +++--- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../main/java/org/openapitools/model/PetDto.java | 4 ++-- .../main/java/org/openapitools/model/PetDto.java | 4 ++-- .../main/java/org/openapitools/model/PetDto.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../main/java/org/openapitools/model/PetDto.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../main/java/org/openapitools/model/PetDto.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../main/java/org/openapitools/model/PetDto.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 2 +- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../src/main/java/org/openapitools/model/Pet.java | 4 ++-- .../java/org/openapitools/virtualan/model/Pet.java | 4 ++-- .../model/ObjectWithDeprecatedFieldsDto.java | 14 +++++++------- .../main/java/org/openapitools/model/PetDto.java | 4 ++-- 49 files changed, 111 insertions(+), 111 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache index 5cd3be04304f..55e0a0b353b1 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/pojo.mustache @@ -156,7 +156,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{! begin feature: fluent setter methods }} {{#deprecated}} /** - * @deprecated + * @deprecated deprecated */ @Deprecated {{/deprecated}} @@ -173,7 +173,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{#deprecated}} /** - * @deprecated + * @deprecated deprecated */ @Deprecated {{/deprecated}} @@ -197,7 +197,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{#deprecated}} /** - * @deprecated + * @deprecated deprecated */ @Deprecated {{/deprecated}} @@ -265,7 +265,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{^lombok.Setter}} {{#deprecated}} /** - * @deprecated + * @deprecated deprecated */ {{/deprecated}} {{#vendorExtensions.x-setter-extra-annotation}} @@ -290,7 +290,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{! begin feature: fluent setter methods for inherited properties }} {{#deprecated}} /** - * @deprecated + * @deprecated deprecated */ @Deprecated {{/deprecated}} @@ -302,7 +302,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{#deprecated}} /** - * @deprecated + * @deprecated deprecated */ @Deprecated {{/deprecated}} @@ -315,7 +315,7 @@ public {{>sealed}}class {{classname}}{{#parent}} extends {{{parent}}}{{/parent}} {{#deprecated}} /** - * @deprecated + * @deprecated deprecated */ @Deprecated {{/deprecated}} 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 225f6f0cc2ed..77ed49fb92a8 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 @@ -3264,11 +3264,11 @@ public void contractWithDeprecatedPropertiesAnnotatesFluentSettersAndCollectionH JavaFileAssert.assertThat(output.get("Example.java")) .fileContains( - " /**\n * @deprecated\n */\n @Deprecated\n public Example deprecatedProperty(", - " /**\n * @deprecated\n */\n @Deprecated\n public Example deprecatedValues(", - " /**\n * @deprecated\n */\n @Deprecated\n public Example addDeprecatedValuesItem(", - " /**\n * @deprecated\n */\n @Deprecated\n public Example deprecatedMap(", - " /**\n * @deprecated\n */\n @Deprecated\n public Example putDeprecatedMapItem(" + " /**\n * @deprecated deprecated\n */\n @Deprecated\n public Example deprecatedProperty(", + " /**\n * @deprecated deprecated\n */\n @Deprecated\n public Example deprecatedValues(", + " /**\n * @deprecated deprecated\n */\n @Deprecated\n public Example addDeprecatedValuesItem(", + " /**\n * @deprecated deprecated\n */\n @Deprecated\n public Example deprecatedMap(", + " /**\n * @deprecated deprecated\n */\n @Deprecated\n public Example putDeprecatedMapItem(" ) .assertMethod("deprecatedProperty", "String") .hasAnnotation("Deprecated") 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 83e4719448a8..a99617cede90 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 @@ -162,7 +162,7 @@ public void setName(JsonNullable name) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet photoUrls(List photoUrls) { @@ -171,7 +171,7 @@ public Pet photoUrls(List photoUrls) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet addPhotoUrlsItem(String photoUrlsItem) { @@ -196,7 +196,7 @@ public List getPhotoUrls() { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("photoUrls") 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 c887a42c90aa..cf6f4c2cfc38 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 @@ -222,7 +222,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -244,7 +244,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") 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 c887a42c90aa..cf6f4c2cfc38 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 @@ -222,7 +222,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -244,7 +244,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") 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 03ebfb1cf338..98c909f0c1d9 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 @@ -213,7 +213,7 @@ public void setTags(List<@Valid TagDto> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public PetDto status(@Nullable StatusEnum status) { @@ -234,7 +234,7 @@ public PetDto status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") 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 f495c7209958..10e58cdc9ac2 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 @@ -212,7 +212,7 @@ public void setTags(List tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public PetDto status(@Nullable StatusEnum status) { @@ -233,7 +233,7 @@ public PetDto status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") 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 cac22ea98e1c..6d75ee81ffe4 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 @@ -213,7 +213,7 @@ public void setTags(List tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public PetDto status(@Nullable StatusEnum status) { @@ -234,7 +234,7 @@ public PetDto status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") 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 f72e0c8928ee..05b15511a6f3 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 @@ -219,7 +219,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -240,7 +240,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") 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 a227eb2c2dab..8c49509cf271 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 @@ -218,7 +218,7 @@ public void setTags(List tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -239,7 +239,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") 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 a227eb2c2dab..8c49509cf271 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 @@ -218,7 +218,7 @@ public void setTags(List tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -239,7 +239,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") 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 4db2d31e6f25..3d57a334bb16 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 @@ -219,7 +219,7 @@ public void setTags(List<@Valid TagDto> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public PetDto status(@Nullable StatusEnum status) { @@ -240,7 +240,7 @@ public PetDto status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java index bf4de6fa5db9..86b0159c38e7 100644 --- a/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java +++ b/samples/client/petstore/spring-http-interface-useHttpServiceProxyFactoryInterfacesConfigurator/src/main/java/org/openapitools/model/Pet.java @@ -220,7 +220,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -241,7 +241,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java index f495c7209958..10e58cdc9ac2 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/PetDto.java @@ -212,7 +212,7 @@ public void setTags(List tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public PetDto status(@Nullable StatusEnum status) { @@ -233,7 +233,7 @@ public PetDto status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java index 1c65c26423ed..58e0a757aae3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-3-with-optional/src/main/java/org/openapitools/model/Pet.java @@ -215,7 +215,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(StatusEnum status) { @@ -236,7 +236,7 @@ public Optional getStatus() { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java index c887a42c90aa..cf6f4c2cfc38 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/model/Pet.java @@ -222,7 +222,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -244,7 +244,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java index 9d5d17a86137..4e2a5960939c 100644 --- a/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-4-with-optional/src/main/java/org/openapitools/model/Pet.java @@ -220,7 +220,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(StatusEnum status) { @@ -241,7 +241,7 @@ public StatusEnum getStatus() { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java index c887a42c90aa..cf6f4c2cfc38 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/model/Pet.java @@ -222,7 +222,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -244,7 +244,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java index c887a42c90aa..cf6f4c2cfc38 100644 --- a/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-http-basic/src/main/java/org/openapitools/model/Pet.java @@ -222,7 +222,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -244,7 +244,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java index c4ecfb845193..7780a7d509fa 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/Pet.java @@ -217,7 +217,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -239,7 +239,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java index c887a42c90aa..cf6f4c2cfc38 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/model/Pet.java @@ -222,7 +222,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -244,7 +244,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java index c887a42c90aa..cf6f4c2cfc38 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/model/Pet.java @@ -222,7 +222,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -244,7 +244,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java index c887a42c90aa..cf6f4c2cfc38 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/model/Pet.java @@ -222,7 +222,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -244,7 +244,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java index c887a42c90aa..cf6f4c2cfc38 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/model/Pet.java @@ -222,7 +222,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -244,7 +244,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java index 9734fad43a4c..e1f7e037deaf 100644 --- a/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-3-include-http-request-context/src/main/java/org/openapitools/model/Pet.java @@ -263,7 +263,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -287,7 +287,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java index f113030d47aa..4e97c3f7b920 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/model/Pet.java @@ -262,7 +262,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -286,7 +286,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java index 7c489b1312c5..7a3349f4055b 100644 --- a/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-4/src/main/java/org/openapitools/model/Pet.java @@ -268,7 +268,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -292,7 +292,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 2f6eb4a6b5ab..3e220ecfa17a 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -225,7 +225,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -247,7 +247,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 2f6eb4a6b5ab..3e220ecfa17a 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -225,7 +225,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -247,7 +247,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java index 2d3d8fce88fb..9e60d2073dbc 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/model/Pet.java @@ -215,7 +215,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -236,7 +236,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java index 4aa77323c010..4c9f4d578428 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/model/Pet.java @@ -218,7 +218,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -240,7 +240,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java index 2f6eb4a6b5ab..3e220ecfa17a 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledExcp/src/main/java/org/openapitools/model/Pet.java @@ -225,7 +225,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -247,7 +247,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java index 2c42eb819ddf..046a41ec128e 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/Pet.java @@ -230,7 +230,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -252,7 +252,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java index 2f6eb4a6b5ab..3e220ecfa17a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/Pet.java @@ -225,7 +225,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -247,7 +247,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java index 2f6eb4a6b5ab..3e220ecfa17a 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/model/Pet.java @@ -225,7 +225,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -247,7 +247,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java index 2f6eb4a6b5ab..3e220ecfa17a 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/Pet.java @@ -225,7 +225,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -247,7 +247,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java index c887a42c90aa..cf6f4c2cfc38 100644 --- a/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate-no-response-entity/src/main/java/org/openapitools/model/Pet.java @@ -222,7 +222,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -244,7 +244,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java index 3364a8d55449..3ae252aa64ca 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/Pet.java @@ -237,7 +237,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -259,7 +259,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java index bbc849dce37d..0c0797e5f012 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/model/Pet.java @@ -215,7 +215,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -236,7 +236,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java index 5bd076bf21d9..25f49948a29f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/Pet.java @@ -225,7 +225,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -247,7 +247,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java index f156c1c317e5..b491016d4d53 100644 --- a/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/server/petstore/springboot-include-http-request-context/src/main/java/org/openapitools/model/PetDto.java @@ -227,7 +227,7 @@ public void setTags(List<@Valid TagDto> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public PetDto status(@Nullable StatusEnum status) { @@ -249,7 +249,7 @@ public PetDto status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java index 871de5ea1e75..116f2c0cc62d 100644 --- a/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-lombok-tostring/src/main/java/org/openapitools/model/Pet.java @@ -152,7 +152,7 @@ public Pet addTagsItem(Tag tagsItem) { /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { diff --git a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java index c887a42c90aa..cf6f4c2cfc38 100644 --- a/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-petstore-with-api-response-examples/src/main/java/org/openapitools/model/Pet.java @@ -222,7 +222,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -244,7 +244,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java index 2f6eb4a6b5ab..3e220ecfa17a 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/Pet.java @@ -225,7 +225,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -247,7 +247,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java index 2f6eb4a6b5ab..3e220ecfa17a 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/Pet.java @@ -225,7 +225,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -247,7 +247,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java index 25b74727ccfa..ab88a6b08305 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/Pet.java @@ -225,7 +225,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(StatusEnum status) { @@ -247,7 +247,7 @@ public Optional getStatus() { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java index 501029312d28..221799bfa6e4 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/Pet.java @@ -225,7 +225,7 @@ public void setTags(List<@Valid Tag> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public Pet status(@Nullable StatusEnum status) { @@ -247,7 +247,7 @@ public Pet status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status") diff --git a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java index a0491698e411..e0ea19ca6cb7 100644 --- a/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java +++ b/samples/server/petstore/springboot-x-implements-skip/src/main/java/org/openapitools/model/ObjectWithDeprecatedFieldsDto.java @@ -67,7 +67,7 @@ public void setUuid(@Nullable String uuid) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public ObjectWithDeprecatedFieldsDto id(@Nullable BigDecimal id) { @@ -89,7 +89,7 @@ public ObjectWithDeprecatedFieldsDto id(@Nullable BigDecimal id) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("id") @@ -98,7 +98,7 @@ public void setId(@Nullable BigDecimal id) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public ObjectWithDeprecatedFieldsDto deprecatedRef(@Nullable DeprecatedObjectDto deprecatedRef) { @@ -120,7 +120,7 @@ public ObjectWithDeprecatedFieldsDto deprecatedRef(@Nullable DeprecatedObjectDto } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("deprecatedRef") @@ -129,7 +129,7 @@ public void setDeprecatedRef(@Nullable DeprecatedObjectDto deprecatedRef) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public ObjectWithDeprecatedFieldsDto bars(List bars) { @@ -138,7 +138,7 @@ public ObjectWithDeprecatedFieldsDto bars(List bars) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public ObjectWithDeprecatedFieldsDto addBarsItem(String barsItem) { @@ -163,7 +163,7 @@ public List getBars() { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("bars") diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java index 4cdda56930b1..8c2c9d6a8c18 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/PetDto.java @@ -228,7 +228,7 @@ public void setTags(List<@Valid TagDto> tags) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated public PetDto status(@Nullable StatusEnum status) { @@ -250,7 +250,7 @@ public PetDto status(@Nullable StatusEnum status) { } /** - * @deprecated + * @deprecated deprecated */ @Deprecated @JsonProperty("status")