swagger-ui as middleware & upgrade to 3.12.2

This commit is contained in:
domaindrivendev
2018-04-26 20:39:42 -07:00
parent 4c708295b9
commit fee8491ab6
74 changed files with 258 additions and 37700 deletions

View File

@@ -3,10 +3,10 @@ require 'rails/generators'
module Rswag
module Ui
class CustomGenerator < Rails::Generators::Base
source_root File.expand_path('../../../../../../app/views/rswag/ui/home', __FILE__)
source_root File.expand_path('../../../../../../lib/rswag/ui', __FILE__)
def add_custom_index
copy_file('index.html.erb', 'app/views/rswag/ui/home/index.html.erb')
copy_file('index.erb', 'app/views/rswag/ui/home/index.html.erb')
end
end
end

View File

@@ -5,5 +5,6 @@ Rswag::Ui.configure do |c|
# JSON endpoint and the second is a title that will be displayed in the document selector
# NOTE: If you're using rspec-api to expose Swagger files (under swagger_root) as JSON endpoints,
# then the list below should correspond to the relative paths for those endpoints
c.swagger_endpoint '/api-docs/v1/swagger.json', 'API V1 Docs'
end