Description
Is your feature request related to a problem? Please describe.
When using static/custom OpenAPI Spec to be the source for the Swagger UI, one currently doesn't seem to have a possibility to overwrite the server URL (which is not known at the design/spec phase of writing the spec and is subject to change based on the deployment/ target env).
Describe the solution you'd like
I'd like to have an option to overwrite the server URL(s) in the custom statically served OpenAPI Spec.
One possible solution (which I implemented as a workaround in current project) would be to use an interceptor doing a preHandle
on the springdoc.swagger-ui.url
and given that it's set and called replaces the server(s) portion of the static/custom OpenAPI Spec with contents of the newly added property springdoc.swagger-ui.serverUrl(s)
.
Describe alternatives you've considered
- Solution based off Desired Server URLs #2750 doesn't work with statically served custom OpenAPI Specs
Additional context
- if this feature request gets accepted, happy to work on a PR.