Customizing the output of OpenAPI
According to the OpenAPI specification (https://swagger.io/specification/), it is possible to customize the full schema of objects that are returned by the /openapi Servlet. This can be done by adding specific annotations to your endpoints classes and methods. Although none of these annotations are mandatory, we will mention some common ones that can improve the readability of your OpenAPI schema.
For example, the @org.eclipse.microprofile.openapi.annotations.tags.Tag annotation can be used as a qualifier to describe a group of specific operations related to the endpoint. This annotation can be applied at the class level. In order to describe a single resource method, you can use the org.eclipse.microprofile.openapi.annotations.Operation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access