Closed
Description
Description
We have deprecated an API in our yaml file. We are generating the code using open api generator maven plugin.
The generated code has "@deprecated" in java comments but no "@deprecated" annotation on the method.
openapi-generator version:5.4.0
OpenAPI declaration file content or url
yaml content:
paths:
'/debug-endpoint/v1/person/{id}':
get:
deprecated: true
summary: get person info
description: Get
parameters:
- name: Id
in: path
required: true
......
Generation Details
plugin config
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>5.4.0</version>
<configuration>
<generateSupportingFiles>true</generateSupportingFiles>
<generatorName>spring</generatorName>
<generateApiDocumentation>true</generateApiDocumentation>
<generateModelDocumentation>true</generateModelDocumentation>
<!-- Duplicate classes being generated due to https://github.com/OpenAPITools/openapi-generator/issues/2701 -->
<typeMappings>a=b</typeMappings>
<configOptions>
<oas3>true</oas3>
<useTags>true</useTags>
<withSeparateModelsAndApi>true</withSeparateModelsAndApi>
<delegatePattern>true</delegatePattern>
<withInterfaces>true</withInterfaces>
<library>spring-boot</library>
<dateLibrary>java8</dateLibrary>
<useSpringfox>false</useSpringfox>
<useSpringController>true</useSpringController>
<modelPropertyNaming>camelCase</modelPropertyNaming>
</configOptions>
<!-- Option to prevent openapi generator to strip off common prefix from enum values -->
<additionalProperties>removeEnumValuePrefix=false</additionalProperties>
<!-- <skipIfSpecIsUnchanged>true</skipIfSpecIsUnchanged>-->
</configuration>