I have a Spring boot Gradle project and I want to get it's OpenAPI spec YAML file.
As I understand the official swagger-core
does not support Spring boot projects, thus I found springdoc-openapi
(https://github.com/springdoc/springdoc-openapi-gradle-plugin).
It seems that in order to get the YAML/JSON files, when running the generateOpenApiDocs
task, the springdoc
library sets up a server with some endpoints (/v3/api-docs) to download the files.
- I'm using the default configuration, and for some reason I keep getting the following error:
Execution failed for task 'generateOpenApiDocs'. Unable to connect to http://localhost:8080/v3/api-docs waited for 30 seconds
It seems that for some reason it does not set up the server. How can I fix it?
- Is it possible to skip the server part? Can I configure springdoc to simply generate files on build?