fastify / fastify-swagger-ui

Serve Swagger-UI for Fastify
MIT License
132 stars 40 forks source link

Allow serving static assets from `baseDir` #108

Closed davidjbng closed 8 months ago

davidjbng commented 9 months ago

Resolves #65

This PR documents how to serve static swagger-ui files from a custom directory and fixes serving static assets when the baseDir option is set.

Checklist

mcollina commented 8 months ago

@Fdawgs ptal

DavidTanner commented 8 months ago

Any idea on when this can be merged?

knolleary commented 7 months ago

I'm concerned this is a breaking change in behaviour and needs to be highlighted as such when it gets published - but would like a second opinion.

Prior to this change, if you set baseDir, the swagger static content would be served from the static folder included with this module. You could then set baseDir to point at another directory of content that should served in addition.

With this change, if you set baseDir it expects you to have copied the static folder included with this module into your baseDir.

So a working configuration prior to this PR will no longer work when this PR is applied.