Class: SwaggerApi::Operations::Update

Inherits:
Base
  • Object
show all
Defined in:
lib/swagger_api/operations/update.rb

Instance Attribute Summary

Attributes inherited from Base

#action, #controller

Instance Method Summary collapse

Methods inherited from Base

#error_responses, #model, #model_name, #parameters, #readable_action, #request_body, #responses

Instance Method Details

#createObject



6
7
8
9
10
# File 'lib/swagger_api/operations/update.rb', line 6

def create
  create = super
  create[:requestBody] = request_body
  create
end

#success_responseObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/swagger_api/operations/update.rb', line 12

def success_response
  {
    '303' => {
      description: "#{readable_action} #{model_name.downcase}'s information",
      headers: {
        Location: {
          schema: {
            type: :string
          }
        }
      }
    }
  }
end