OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
20.54k stars 6.27k forks source link

[BUG] [jaxrs-spec] Not generating @Deprecated annotations #18941

Open Philzen opened 2 weeks ago

Philzen commented 2 weeks ago

This came up in #12804.

          This also occurs in the quarkus library.

Originally posted by @KnechtRootrecht in https://github.com/OpenAPITools/openapi-generator/issues/12804#issuecomment-1639804266

Philzen commented 2 weeks ago

Seems like it's not only quarkus but actually all jaxrs-spec generated code.

Should apply to the whole object here (quarkus sample): https://github.com/OpenAPITools/openapi-generator/blob/master/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/DeprecatedObject.java

In this sample using the default library all of these methods should be annotated as @Deprecated, but they aren't: https://github.com/OpenAPITools/openapi-generator/blob/989a79811a5cae2b10e07e6c4d5261af3da1e39d/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/model/Pet.java#L223-L241