-
Notifications
You must be signed in to change notification settings - Fork 149
Closed
Labels
Description
It appears that when ReDoc is used, the OpenAPI 2.0/Swagger spec is defaulted to "/swagger.json" and ignores basePath while also providing no way to directly or indirectly set .SpecURL in the Redoc template.
In my situation, I'm hosting multiple separate APIs from the same listener. I can load Redoc from myhost/api-type/api-sub-type/version/docs but the rendered template always points to myhost/swagger.json.
I could not find a way to provide an override, alter the value directly, or make the basePath from my OpenApi 2.0 spec be referenced in any way.
Changes to runtime appear to be:
- alter
RedocOptsfieldSpecURLto be a relative path: "./swagger.json" or "swagger.json" instead of "/swagger.json" - alter
RedocOptsfieldSpecURLto takeBasePathinto account - provide a way to override/set the SpecURL externally from
Context
If there is a different way to handle this or I am missing something please let me know!
Reactions are currently unavailable