Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
MIT License
1.4k
stars
225
forks
source link
feature: ability to serve the docs as a single-file #357
wanted to add authentication middlewares (w/ bearer-auth) to the endoint where we serve swagger-ui's content
but seeing as the html file imports other assets, including the most curicial one swagger-ui-init.js, this doesn't seem feasible
so how about a handler that can serve all the content as a single-file?
currently I have hacked a solution at work buy using serveFiles method and calling it with dummy a request object
do let me know if you'd be open to adding such a method! I can then raise a PR
wanted to add authentication middlewares (w/ bearer-auth) to the endoint where we serve swagger-ui's content
but seeing as the html file imports other assets, including the most curicial one swagger-ui-init.js, this doesn't seem feasible so how about a handler that can serve all the content as a single-file?
currently I have hacked a solution at work buy using
serveFiles
method and calling it with dummy a request object do let me know if you'd be open to adding such a method! I can then raise a PR