annotationsswaggeropenapispring-annotations

Alias for repeatable Swagger/OpeanAPI meta-annotation


I have a REST controller, in which each method is bearing Swagger's @ApiResponseannotation for multiple response codes. In case of an HTTP 200 response code the schema implementation differs for each endpoint method, but for all the other response codes the implementation is the same.

Is it possible to create an alias only for the implementation in the HTTP 200 case?


Solution

  • yes, it's located here https://medium.com/@aldungarov.ar/annotation-composition-in-spring-d533ef59f0c5

    with using custom annotations and @AliasFor