rswag/app/controllers/swagger_rails/swagger_ui_controller.rb

15 lines
288 B
Ruby

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
end