Class: JsonapiSwaggerHelpers::UpdateAction
- Inherits:
-
Object
- Object
- JsonapiSwaggerHelpers::UpdateAction
show all
- Includes:
- Writeable
- Defined in:
- lib/jsonapi_swagger_helpers/update_action.rb
Instance Method Summary
collapse
Methods included from Writeable
#all_tags, #context, #default_description, #define_schema, #each_strong_relation, #generate_request_schema!, included, #initialize, #operation_id, #payload_tags, #request_schema_id, #strong_resource, #util
Instance Method Details
#action_name ⇒ Object
5
6
7
|
# File 'lib/jsonapi_swagger_helpers/update_action.rb', line 5
def action_name
:update
end
|
#generate ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/jsonapi_swagger_helpers/update_action.rb', line 9
def generate
_self = self
define_schema
@node.operation :put do
key :description, _self.description
key :operationId, _self.operation_id
key :tags, _self.all_tags
_self.util.id_in_url(self)
parameter do
key :name, :payload
key :in, :body
schema do
key :'$ref', _self.request_schema_id
end
end
response 200 do
key :description, 'API Response'
end
end
end
|