You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues to ensure the feature has not already been requested
馃殌 Feature Proposal
@fastify/swagger-ui provides the routePrefix option that allows you to modify the default route prefix of /documentation. For example: /api-docs. This allows some level of customisation.
However, when you browse to the routePrefix, the plugin is hardcoded to redirect you to /api-docs/static/index.html.
I would like the swagger ui to be served from /api-docs/without that redirection.
Is there a specific reason or limitation with the swagger-ui that requires this redirection? There may be some subtle aspects on how swagger-ui expects to load its own static assets that make this hard than it sounds.
I don't have a specific proposal at this stage for how this behaviour would be enabled in the configuration - most likely a boolean flag to disable the redirect... although what that gets called is open to suggestion.
Motivation
My main motivation here is trying to keep our application's URls consistent and tidy.
We don't use index.html in the path for any of our routes - I'd prefer the swagger-ui follows what we have elsewhere.
Example
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
馃殌 Feature Proposal
@fastify/swagger-ui
provides theroutePrefix
option that allows you to modify the default route prefix of/documentation
. For example:/api-docs
. This allows some level of customisation.However, when you browse to the routePrefix, the plugin is hardcoded to redirect you to
/api-docs/static/index.html
.I would like the swagger ui to be served from
/api-docs/
without that redirection.Is there a specific reason or limitation with the swagger-ui that requires this redirection? There may be some subtle aspects on how swagger-ui expects to load its own static assets that make this hard than it sounds.
I don't have a specific proposal at this stage for how this behaviour would be enabled in the configuration - most likely a boolean flag to disable the redirect... although what that gets called is open to suggestion.
Motivation
My main motivation here is trying to keep our application's URls consistent and tidy.
We don't use
index.html
in the path for any of our routes - I'd prefer the swagger-ui follows what we have elsewhere.Example
No response
The text was updated successfully, but these errors were encountered: