rswag/app/controllers/swagger_rails/swagger_ui_controller.rb

15 lines
308 B
Ruby

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