springdoc / springdoc-openapi-maven-plugin

Library for OpenAPI 3 with spring-boot
https://springdoc.org
Apache License 2.0
141 stars 37 forks source link

Runtime or buildtime? #51

Closed Luthien-in-edhil closed 1 year ago

Luthien-in-edhil commented 1 year ago

While upgrading from the old Swagger Springfox library to Springdoc, I was reading this Baeldung article which mentioned this springdoc-openapi Maven Plugin.

The readme.md here on Github starts with:

The aim of springdoc-openapi-maven-plugin is to generate json and yaml OpenAPI description during runtime

though, as I understand it, this plugin is actually providing the documentation at build time instead, as is implicit in the Baeldung article, and clarified by this SO answer by diegomtassis:

By using springdoc-openapi-ui you generate the documentation (html, json & yaml) at runtime, when your app is deployed. In some scenarios you may want to have the documentation at build time, and that's what the springdoc-openapi-maven-plugin is for. In order for it to work you need as well to have your application started using spring-boot during the integration phase, as explained in the documentation.

It might prevent some confusion if the readme was clear about that :)

bnasslahsen commented 1 year ago

@Luthien-in-edhil,

Thank you for your feedback. We will leave the documentation as it is right now.