Description
In my specific scenario, I would like to use springdoc
so that my spring-boot application has swagger-ui
nicely integrated, but I need to provide my own (manually created) OpenAPI definition file.
Describe the solution you'd like
I want to add the openapi.json
file to my src/main/resources
folder and set a springdoc property (a path to that file) so that /v3/api-docs
endpoint returns my definition file for swagger-ui
without any additional config. In other words, I want to override the automatically generated definition (so that the swagger-ui endpoint will return my file).
Describe alternatives you've considered
- Adding a
/v3/api-docs
file to mysrc/main/resources/static
files, so spring responds with it but it does not work as expected since spring will not set a proper content-type header (seems rather hacky)
Additional context
Having a generated file in the repository allows me to review changes reflected in openapi definition or I can use GithubApp that will do some validation/standardization on PR touching such file.
Do you think this feature request is valid?
Would you be ok with such feature added?