mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-23 06:16:42 +00:00
15 lines
321 B
Ruby
15 lines
321 B
Ruby
module SwaggerRails
|
|
class SwaggerDocsController < ApplicationController
|
|
|
|
def show
|
|
render file: swagger_file_path_for(params[:api_version]), layout: false
|
|
end
|
|
|
|
private
|
|
|
|
def swagger_file_path_for(api_version)
|
|
File.join(Rails.root, 'config', 'swagger', "#{api_version}.json")
|
|
end
|
|
end
|
|
end
|