-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Not generating @Deprecated annotations #12804
Comments
can you please try the latest stable version v6.0.1? there's been a lot of enhancements, bug fixes in the spring boot generator. |
same issue in 6.0.1 also |
This is still not working in 6.2.1 using the gradle plugin. The |
Still not working in 6.4.0 |
Do we have any update on this issue, the issue seems specific to the spring-boot library type. |
This also occurs in the quarkus library. |
@sourav-jha This seems to have been fixed via #16493 – can you check if this is solved for you and close the issue if it is? |
@Philzen, I now have it twice when using the Sample broken Java code: @Deprecated
public CredentialRepresentation.Builder device(String device) {
this.instance.device(device);
return this;
}
@Deprecated This can be reproduced using for instance the Keycloak OpenAPI spec and the following Maven plugin configuration: <plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>7.6.0</version>
<configuration>
<generatorName>spring</generatorName>
<skipValidateSpec>true</skipValidateSpec>
<inputSpec>${project.basedir}/keycloak-admin-api.openapi.json</inputSpec>
<apiPackage>org.keycloak.admin.api</apiPackage>
<modelPackage>org.keycloak.admin.model</modelPackage>
<nameMappings>authTime=depreacatedAuthTime</nameMappings>
<configOptions>
<documentationProvider>none</documentationProvider>
<annotationLibrary>none</annotationLibrary>
<ensureUniqueParams>true</ensureUniqueParams>
<generateBuilders>true</generateBuilders>
<interfaceOnly>true</interfaceOnly>
<library>spring-http-interface</library>
<openApiNullable>false</openApiNullable>
<serializableModel>true</serializableModel>
<useOptional>true</useOptional>
</configOptions>
</configuration>
</plugin> |
Please feel free to submit a PR to fix it or I will take a look over the weekend |
Serves as an additional regression check for OpenAPITools#12804
Serves as an additional regression check for OpenAPITools#12804
Serves as an additional regression check for OpenAPITools#12804
Serves as an additional regression check for OpenAPITools#12804
Serves as an additional regression check for OpenAPITools#12804
Serves as an additional regression check for OpenAPITools#12804
…cated` annotation with `generateBuilders=true` (#18917) * Implement regression test for #12804 * Fix duplicate rendering of @deprecated annotation on Builder methods * Regenerate samples * Sort entries so it's easier to parse if an entry already exists * Add sample that uses generateBuilders=true to test build matrix Serves as an additional regression check for #12804 * Add --no-transfer-progress to mvn build command to increase log legibility
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:
Generation Details
plugin config
The text was updated successfully, but these errors were encountered: