Class: Swagger::Api::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, #responses, #success_response

Instance Method Details

#createObject



5
6
7
8
9
# File 'lib/swagger/api/operations/update.rb', line 5

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

#request_bodyObject



11
12
13
14
15
# File 'lib/swagger/api/operations/update.rb', line 11

def request_body
  {
    "$ref" => "#/components/requestBodies/#{model_name}"
  }
end