mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 15:22:56 +00:00
Support multiple swagger documents. Add custom_ui_generator. Update readme
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
module SwaggerRails
|
||||
class ApplicationController < ActionController::Base
|
||||
|
||||
def redirect_to_swagger_ui
|
||||
redirect_to swagger_ui_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,6 +2,12 @@ module SwaggerRails
|
||||
class SwaggerUiController < ApplicationController
|
||||
|
||||
def index
|
||||
@discovery_paths = Hash[
|
||||
SwaggerRails.swagger_docs.map do |name, path|
|
||||
[ name, "#{root_path}#{path}" ]
|
||||
end
|
||||
]
|
||||
|
||||
render :index, layout: false
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user