class SwaggerApi::Operations::Index
Public Instance Methods
error_responses()
click to toggle source
Calls superclass method
SwaggerApi::Operations::Base#error_responses
# File lib/swagger_api/operations/index.rb, line 46 def error_responses super.reject do |error_response| %w[404 422].include?(error_response.keys.first) end end
headers()
click to toggle source
# File lib/swagger_api/operations/index.rb, line 6 def headers { 'x-total' => { schema: { type: :integer }, description: 'total results available' }, 'x-link-next' => { schema: { type: :string }, description: 'uri for next page of results' } } end
parameters()
click to toggle source
# File lib/swagger_api/operations/index.rb, line 23 def parameters columns.map do |column| next if column.name.start_with?('encrypted_') || column.name.end_with?('_iv') { name: column.name, in: 'query', required: false, description: "#{column.name} of #{model.name}", schema: SwaggerApi::ColumnSchema.new(column: column).create } end.compact end
readable_action()
click to toggle source
# File lib/swagger_api/operations/index.rb, line 42 def readable_action 'list' end
success_response()
click to toggle source
Calls superclass method
SwaggerApi::Operations::Base#success_response
# File lib/swagger_api/operations/index.rb, line 36 def success_response success = super success['200'][:headers] = headers success end