rswag/app/controllers/swagger_rails/swagger_ui_controller.rb
2016-04-06 09:19:41 -07:00

15 lines
301 B
Ruby

module SwaggerRails
class SwaggerUiController < ApplicationController
def index
@discovery_paths = Hash[
SwaggerRails.swagger_docs.map do |path, doc|
[ "#{root_path}#{path}", doc[:info][:title] ]
end
]
render :index, layout: false
end
end
end