swagger_ui_engine
swagger_ui_engine copied to clipboard
Path to documentation
Please help to figure out how to change path to documentation so that I won't need to place it under 'public/swagger_docs/v1/swagger.json'? I'm used to use https://github.com/brennovich/ruby-swagger and with Rails update 'swagger_engine' is not working anymore (of course). I could write task for copying .json file everytime it's generated, but that's not nice.
SwaggerUiEngine.configure do |config|
config.swagger_url = {
v1: '/doc/api/v1/swagger.json'
}
end
Then you can place your swagger.json
under /public/doc/api/v1/swagger.json
This only makes sense if you want your docs to be public knowledge. Would be useful if you could specify a file that was not available to the web.