Class: Swagger::Api::Operations::Index

Inherits:
Base
  • Object
show all
Defined in:
lib/swagger/api/operations/index.rb

Instance Attribute Summary

Attributes inherited from Base

#action, #controller

Instance Method Summary collapse

Methods inherited from Base

#create, #model, #model_name, #responses, #success_response

Instance Method Details

#error_responsesObject



21
22
23
24
25
# File 'lib/swagger/api/operations/index.rb', line 21

def error_responses
  super.reject do |error_response|
    %w(404).include?(error_response.keys.first)
  end
end

#parametersObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/swagger/api/operations/index.rb', line 5

def parameters
  columns.map do |column|
    {
      name: column.name,
      in: 'query',
      required: false,
      description: "#{column.name} of #{model.name}",
      schema: Swagger::Api::ColumnSchema.new(column: column).create,
    }
  end
end

#readable_actionObject



17
18
19
# File 'lib/swagger/api/operations/index.rb', line 17

def readable_action
  'list'
end