Generate the documentation at runtime when app is deployed
To generate the documentation at runtime, when app is deployed you need springdoc-openapi-maven-plugin.
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.
The plugin works during integration-tests phase, and generate the OpenAPI description.
The plugin works in conjunction with spring-boot-maven plugin.
You can test it during the integration tests phase using the maven command: mvn verify
In order to use this functionality, you need to add the plugin declaration on the plugins section of your pom.xml.
References: springdoc-openapi-maven-plugin
References: springdoc-openapi-maven-plugin
Comments
Post a Comment