swagger_ui_engine icon indicating copy to clipboard operation
swagger_ui_engine copied to clipboard

Path to documentation

Open aleksandra-stolyar opened this issue 6 years ago • 2 comments

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.

aleksandra-stolyar avatar Aug 31 '18 14:08 aleksandra-stolyar

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

wayne5540 avatar Mar 26 '19 00:03 wayne5540

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.

JoeWoodward avatar Feb 05 '20 09:02 JoeWoodward