Class: Api::OpenApiController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Api::OpenApiController
- Defined in:
- app/controllers/api/open_api_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
10 11 12 13 |
# File 'app/controllers/api/open_api_controller.rb', line 10 def index @version = params[:version].match?(/v\d+/) ? params[:version] : raise("Unknown version error") render "api/#{@version}/open_api/index", layout: nil, format: :text end |
#set_default_response_format ⇒ Object
4 5 6 |
# File 'app/controllers/api/open_api_controller.rb', line 4 def set_default_response_format request.format = :yaml end |