I have a SpringBoot project and want to generate openapi doc (json or yaml) at runtime. For that I wanted to use the springdoc-openapi-maven-plugin, since the documenation states that
The aim of springdoc-openapi-maven-plugin is to generate json and yaml OpenAPI description during build time. Source
But this is what the GitHub project states:
The aim of springdoc-openapi-maven-plugin is to generate json and yaml OpenAPI description during runtime. If you want to get swagger definitions properly, the application should completely running as locally. Source
So I'm a bit confused. What is the best way to get what i want?
The aim of
springdoc-openapi-maven-pluginis to run your app (that already has springdoc configured), retrieve openapi json or yaml, and store it in your project.If you want tho have it at the runtime only just follow this document: https://springdoc.org/#getting-started