Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
5.0.0
Plugin version
5.1.0
Node.js version
20.18
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
15.0.1
Description
It's appears #178 is causing an issue when using a complex path in routePrefix
, ie:
await this.instance.register(fastifySwaggerUI, {
routePrefix: '/api/vi/$docs'
});
The resolved path looks like /api/v1/api/v1/$docs/static
in that case.

See linked repo for MRE.
Link to code that reproduces the bug
https://github.com/jpb06/fastify-swagger-ui-routeprefix-issue-repro
Expected Behavior
index resources to load properly.
Metadata
Metadata
Assignees
Labels
No labels