fastify-swagger-ui icon indicating copy to clipboard operation
fastify-swagger-ui copied to clipboard

fix: static content for routePrefix with subpath (#165)

Open miraries opened this issue 6 months ago • 0 comments

This fixes https://github.com/fastify/fastify-swagger-ui/issues/165, where having a subpath in routePrefix breaks static content loading due to changes in https://github.com/fastify/fastify-swagger-ui/pull/164.

Now the static content urls are relative only with a trailing slash, otherwise they're absolute - meaning they work the same as before the regression.

The tests for this were already developed but with wrong assertions, to be able to test static content is loaded I assume we'd need to run playwright with different prefix variations, which would require a refactor as all playwright tests are run with /documentation as the prefix.
Please let me know if you have any suggestions regarding the tests.

Checklist

miraries avatar Aug 03 '24 08:08 miraries