Support multiple swagger documents. Add custom_ui_generator. Update readme

This commit is contained in:
domaindrivendev
2016-02-05 14:47:55 -08:00
parent df4b9c80c9
commit 4b40fb9efe
18 changed files with 298 additions and 14 deletions

View File

@@ -1,4 +1,8 @@
module SwaggerRails
class ApplicationController < ActionController::Base
def redirect_to_swagger_ui
redirect_to swagger_ui_path
end
end
end

View File

@@ -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