You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running my application on Spring Boot 3.2.4 with Java 17. For generating Swagger/OpenAPI documentation, I am using Springdoc-OpenApi version 2.5.0. I came across the springdoc-openapi-maven-plugin which can generate the documentation, but it starts the application, generates the OpenAPI documentation, and then stops the application. This behavior is not suitable for my use case. I want to generate the OpenAPI documentation at build time without starting the application in any way.
I have created a profile called "generate-swagger-client" and placed the necessary plugins inside it. To execute the profile, I use the command "mvn clean install -P generate-swagger-client". The command successfully generates the OpenAPI documentation, but it also starts and stops the application in the process. However, I want to generate the OpenAPI documentation at build time without starting the application.
@ragro Have a look at https://github.com/stoicflame/enunciate. Its a different tool but it does what you want by design. With SpringDoc it fells like an ugly hack in my opinion. (just the get the spec during buildtime part)
I am running my application on Spring Boot 3.2.4 with Java 17. For generating Swagger/OpenAPI documentation, I am using Springdoc-OpenApi version 2.5.0. I came across the springdoc-openapi-maven-plugin which can generate the documentation, but it starts the application, generates the OpenAPI documentation, and then stops the application. This behavior is not suitable for my use case. I want to generate the OpenAPI documentation at build time without starting the application in any way.
Below is the dependencies I added in pom.xml :
I have created a profile called "generate-swagger-client" and placed the necessary plugins inside it. To execute the profile, I use the command "mvn clean install -P generate-swagger-client". The command successfully generates the OpenAPI documentation, but it also starts and stops the application in the process. However, I want to generate the OpenAPI documentation at build time without starting the application.
Below is the plugins :
I want to generate the OpenAPI documentation at build time without starting the application in any way. How can i fix this ?
The text was updated successfully, but these errors were encountered: