mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 15:22:56 +00:00
swagger-ui as middleware & upgrade to 3.12.2
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user