Action
Wraps action definitions within a resource.
Example
ruby
resource.actions[:show].method # => :get
resource.actions[:show].path # => "/posts/:id"
resource.actions[:create].request # => Action::Request
resource.actions.each_value do |action|
action.method # => :get, :post, :patch, :delete
action.request # => Action::Request
action.response # => Action::Response
action.deprecated? # => false
endModules
Instance Methods
#deprecated?
#deprecated?
Whether this action is deprecated.
Returns
Boolean
#description
#description
The description for this action.
Returns
String, nil
#method
#method
The method for this action.
Returns
Symbol
#operation_id
#operation_id
The operation ID for this action.
Returns
String, nil
#path
#path
The path for this action.
Returns
String
#raises
#raises
The raises for this action.
Returns
Array<Symbol>
#request
#request
The request for this action.
Returns
#response
#response
The response for this action.
Returns
#summary
#summary
The summary for this action.
Returns
String, nil
#tags
#tags
The tags for this action.
Returns
Array<String>
#to_h
#to_h
Converts this action to a hash.
Returns
Hash