Class: Swagger::Api::Operations::Index
- Inherits:
-
Base
- Object
- Base
- Swagger::Api::Operations::Index
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_responses ⇒ Object
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
|
#parameters ⇒ Object
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_action ⇒ Object
17
18
19
|
# File 'lib/swagger/api/operations/index.rb', line 17
def readable_action
'list'
end
|