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.

Go to source code

References: springdoc-openapi-maven-plugin

Comments

Popular posts from this blog

Debug Java Stream in Intellij Idea

Creating Efficient Docker Images with Spring Boot 2.3

CRUD Goes Even Easier With JPABuddy