Class: Api::OpenApiController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/api/open_api_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



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_formatObject



4
5
6
# File 'app/controllers/api/open_api_controller.rb', line 4

def set_default_response_format
  request.format = :yaml
end