How to externalize some parts of an API specification? #1995
-
It's amazing that we can annotate classes and generate a full API specification, but if a lengthy description is added to the This is possible in a Grails / Spring Boot application by using the gradle plugin
In addition to the above, a file called 'openapi.yaml' would exist at the root of the project. This file could then contain something like this:
With the above gradle configuration & a yaml file, when the swagger documentation is generated via the For maintainers of larger API specifications that add additional data to the description section, this is extremely useful. Tools like redoc can break up this description into separate sections of your api documentation. Are there any solutions similar to the swagger gradle plugin with spring, but for a micronaut application? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Read documenttion, please. You can use placeholdores in annotations and set these properties as you wish:
|
Beta Was this translation helpful? Give feedback.
Read documenttion, please. You can use placeholdores in annotations and set these properties as you wish:
openapi.properties
file