Closed blue86321 closed 2 months ago
4.28.1
4.0.1
20.x
macOS
14.5
When we config the routePrefix parameter like below
routePrefix
import { fastifySwaggerUi } from "@fastify/swagger-ui"; fastify.register(fastifySwaggerUi, { routePrefix: "/api/docs" })
It breaks the documentation page as the css/js resource double the api prefix.
api
The resource can be visited by manually twisting the url
Removing the routePrefix, the documentation can be rendered correctly
No response
The documentation page should be rendered correctly even with routePrefix config
It works on version 4.0.0, I doubt it's because of this PR #164
4.0.0
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.
Prerequisites
Fastify version
4.28.1
Plugin version
4.0.1
Node.js version
20.x
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
14.5
Description
When we config the
routePrefix
parameter like belowIt breaks the documentation page as the css/js resource double the
api
prefix.The resource can be visited by manually twisting the url
Removing the
routePrefix
, the documentation can be rendered correctlyLink to code that reproduces the bug
No response
Expected Behavior
The documentation page should be rendered correctly even with
routePrefix
config