Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
serveFiles
to work w/ dynamic swaggerDoc
`serveFiles` did not respect on-the-fly changes in a swagger doc, but rendered the old content. The fix now also enables this pattern, where `serveFiles` doesn't need the swaggerDoc upfront (which is desired in dynamic cases): ```js app.use('/api-docs-dynamic', function(req, res, next){ swaggerDocument.info.description = `Hello ${count}!`; req.swaggerDoc = swaggerDocument; next(); }, swaggerUi.serveFiles(), swaggerUi.setup()); // ^^^ ```
- Loading branch information