diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache index 284cb4aecedb..3356f988d838 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/api.mustache @@ -87,6 +87,9 @@ class {{classname}}Controller({{#serviceInterface}}@Autowired(required = true) v {{#vendorExtensions.x-operation-extra-annotation}} {{{.}}} {{/vendorExtensions.x-operation-extra-annotation}} + {{#isDeprecated}} + @Deprecated(message="Operation is deprecated") + {{/isDeprecated}} @RequestMapping( method = [RequestMethod.{{httpMethod}}], // "{{#lambdaEscapeInNormalString}}{{{path}}}{{/lambdaEscapeInNormalString}}" diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache index 527b59314925..f3bacfe43727 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/apiInterface.mustache @@ -102,6 +102,9 @@ interface {{classname}} { {{#vendorExtensions.x-operation-extra-annotation}} {{{.}}} {{/vendorExtensions.x-operation-extra-annotation}} + {{#isDeprecated}} + @Deprecated(message="Operation is deprecated") + {{/isDeprecated}} @RequestMapping( method = [RequestMethod.{{httpMethod}}], // "{{#lambdaEscapeInNormalString}}{{{path}}}{{/lambdaEscapeInNormalString}}" diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/service.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/service.mustache index 309be55743b4..9bb66d0ae97e 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/service.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/service.mustache @@ -30,6 +30,9 @@ interface {{classname}}Service { {{/externalDocs}} * @see {{classname}}#{{operationId}} */ + {{#isDeprecated}} + @Deprecated(message="Operation is deprecated") + {{/isDeprecated}} {{#reactive}}{{^isArray}}suspend {{/isArray}}{{#isArray}}{{^useFlowForArrayReturnType}}suspend {{/useFlowForArrayReturnType}}{{/isArray}}{{/reactive}}fun {{operationId}}({{#allParams}}{{{paramName}}}: {{^isBodyParam}}{{>optionalDataType}}{{/isBodyParam}}{{#isBodyParam}}{{^reactive}}{{>optionalDataType}}{{/reactive}}{{#reactive}}{{^isArray}}{{>optionalDataType}}{{/isArray}}{{#isArray}}Flow<{{{baseType}}}>{{/isArray}}{{/reactive}}{{/isBodyParam}}{{^-last}}, {{/-last}}{{/allParams}}): {{>returnTypes}} {{/operation}} } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java index 6ed5446c1cad..9f59e7f2f967 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java @@ -4663,6 +4663,49 @@ public void testSealedResponseInterfacesVoidResponse() throws IOException { Assert.assertTrue(petContent.contains(") : CreatePetResponse {") || petContent.contains(") : CreatePetResponse"), "Pet should implement CreatePetResponse"); } + + @Test + public void testDeprecatedAnnotationOnInterface() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "org.openapitools.api"); + codegen.additionalProperties().put(KotlinSpringServerCodegen.INTERFACE_ONLY, true); + + new DefaultGenerator().opts(new ClientOptInput() + .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/support-deprecated-api.yaml")) + .config(codegen)) + .generate(); + + assertFileContains( + Paths.get(outputPath + "/src/main/kotlin/org/openapitools/api/PingApi.kt"), + "@Deprecated(message=\"Operation is deprecated\") @RequestMapping(" + ); + } + + @Test + public void testDeprecatedAnnotationOnController() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + String outputPath = output.getAbsolutePath().replace('\\', '/'); + + KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen(); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "org.openapitools.api"); + + new DefaultGenerator().opts(new ClientOptInput() + .openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/support-deprecated-api.yaml")) + .config(codegen)) + .generate(); + + assertFileContains( + Paths.get(outputPath + "/src/main/kotlin/org/openapitools/api/PingApiController.kt"), + "@Deprecated(message=\"Operation is deprecated\") @RequestMapping(" + ); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/kotlin/support-deprecated-api.yaml b/modules/openapi-generator/src/test/resources/3_0/kotlin/support-deprecated-api.yaml new file mode 100644 index 000000000000..223d58ad47a5 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/kotlin/support-deprecated-api.yaml @@ -0,0 +1,14 @@ +openapi: "3.0.0" +info: + title: Verify @Deprecated annotation + version: "1.0" + +paths: + + /ping: + get: + deprecated: true + operationId: ping + responses: + 200: + description: OK diff --git a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/PetApi.kt index 22fc3321521c..98b83e3bdcfa 100644 --- a/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-spring-cloud/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -73,6 +73,7 @@ interface PetApi { } + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt index 5dd603c189fb..add6ff045ac4 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -106,6 +106,7 @@ class PetApiController() { ApiResponse(responseCode = "400", description = "Invalid tag value") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "read:pets" ]) ] ) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/api/PetApi.kt index 24f8a5b5f870..9cf7362b484d 100644 --- a/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-spring-sealed-interfaces/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -78,6 +78,7 @@ interface PetApi { } + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt index 1d02b4b3083e..a6dd78ee6eaf 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -69,6 +69,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { } + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiService.kt index 031da963d22d..5dc0b6978803 100644 --- a/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-3-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -48,6 +48,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") fun findPetsByTags(tags: kotlin.collections.List): List /** diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiController.kt index 1d02b4b3083e..a6dd78ee6eaf 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -69,6 +69,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { } + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiService.kt index 031da963d22d..5dc0b6978803 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -48,6 +48,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") fun findPetsByTags(tags: kotlin.collections.List): List /** diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/api/PetApiController.kt index 1d02b4b3083e..a6dd78ee6eaf 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -69,6 +69,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { } + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/api/PetApiService.kt index 031da963d22d..5dc0b6978803 100644 --- a/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-additionalproperties/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -48,6 +48,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") fun findPetsByTags(tags: kotlin.collections.List): List /** diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt index 0d84aaeeac03..136b2b740967 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -121,6 +121,7 @@ interface PetApi { ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "read:pets" ]) ] ) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index 1b42f1eee71e..af9867676e67 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -120,6 +120,7 @@ interface PetApi { ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "read:pets" ]) ] ) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt index 9fb28de9e854..e18012463efb 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -104,6 +104,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { ApiResponse(responseCode = "400", description = "Invalid tag value") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] ) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiService.kt index db655b8a7978..566196d1e86d 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -45,6 +45,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") fun findPetsByTags(tags: kotlin.collections.List): List /** diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index 429ca3649b84..da550188814b 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -74,6 +74,7 @@ interface PetApi { } @ResponseStatus(HttpStatus.OK) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiService.kt index db655b8a7978..566196d1e86d 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity-delegate/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -45,6 +45,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") fun findPetsByTags(tags: kotlin.collections.List): List /** diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt index b765890c06d2..fb2a54e84a07 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -68,6 +68,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { } @ResponseStatus(HttpStatus.OK) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiService.kt index db655b8a7978..566196d1e86d 100644 --- a/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-no-response-entity/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -45,6 +45,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") fun findPetsByTags(tags: kotlin.collections.List): List /** diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt index 4eb99427a4d9..165920c56390 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -107,6 +107,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { ApiResponse(responseCode = "400", description = "Invalid tag value") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "read:pets" ]) ] ) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiService.kt index ce1e55020fff..ed714a425820 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -49,6 +49,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") suspend fun findPetsByTags(tags: kotlin.collections.List): List /** diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt index 1f183caa6cb1..682a15ef48e1 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -107,6 +107,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { ApiResponse(responseCode = "400", description = "Invalid tag value") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "read:pets" ]) ] ) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt index 2728966a96f4..79151790a6ca 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -49,6 +49,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") fun findPetsByTags(tags: kotlin.collections.List): Flow /** diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt index cfb20cbf86c5..c257bd1a992d 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -118,6 +118,7 @@ interface PetApi { ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "read:pets" ]) ] ) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt index 0a32254f2f27..528e299c7357 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -109,6 +109,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")]) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiService.kt index db655b8a7978..566196d1e86d 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -45,6 +45,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") fun findPetsByTags(tags: kotlin.collections.List): List /** diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt index 9fb28de9e854..e18012463efb 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -104,6 +104,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { ApiResponse(responseCode = "400", description = "Invalid tag value") ], security = [ SecurityRequirement(name = "petstore_auth", scopes = [ "write:pets", "read:pets" ]) ] ) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiService.kt index db655b8a7978..566196d1e86d 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -45,6 +45,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") fun findPetsByTags(tags: kotlin.collections.List): List /** diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt index 0a32254f2f27..528e299c7357 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -109,6 +109,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { authorizations = [Authorization(value = "petstore_auth", scopes = [AuthorizationScope(scope = "write:pets", description = "modify pets in your account"), AuthorizationScope(scope = "read:pets", description = "read your pets")])]) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Pet::class, responseContainer = "List"),ApiResponse(code = 400, message = "Invalid tag value")]) + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiService.kt index db655b8a7978..566196d1e86d 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -45,6 +45,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") fun findPetsByTags(tags: kotlin.collections.List): List /** diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt index f2ff1fb47490..7e4085fe9d38 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -69,6 +69,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { } + @Deprecated(message="Operation is deprecated") @RequestMapping( method = [RequestMethod.GET], // "/pet/findByTags" diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt index db655b8a7978..566196d1e86d 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiService.kt @@ -45,6 +45,7 @@ interface PetApiService { * @deprecated * @see PetApi#findPetsByTags */ + @Deprecated(message="Operation is deprecated") fun findPetsByTags(tags: kotlin.collections.List): List /**