Class: OasCore::Spec::Operation
- Inherits:
-
Object
- Object
- OasCore::Spec::Operation
- Includes:
- Specable
- Defined in:
- lib/oas_core/spec/operation.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#operation_id ⇒ Object
Returns the value of attribute operation_id.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#request_body ⇒ Object
Returns the value of attribute request_body.
-
#responses ⇒ Object
Returns the value of attribute responses.
-
#security ⇒ Object
Returns the value of attribute security.
-
#specification ⇒ Object
Returns the value of attribute specification.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(specification) ⇒ Operation
constructor
A new instance of Operation.
- #oas_fields ⇒ Object
Methods included from Specable
Constructor Details
#initialize(specification) ⇒ Operation
Returns a new instance of Operation.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/oas_core/spec/operation.rb', line 11 def initialize(specification) @specification = specification @summary = '' @operation_id = '' @tags = [] @description = @summary @parameters = [] @request_body = {} @responses = Spec::Responses.new(specification) @security = [] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/oas_core/spec/operation.rb', line 8 def description @description end |
#operation_id ⇒ Object
Returns the value of attribute operation_id.
8 9 10 |
# File 'lib/oas_core/spec/operation.rb', line 8 def operation_id @operation_id end |
#parameters ⇒ Object
Returns the value of attribute parameters.
8 9 10 |
# File 'lib/oas_core/spec/operation.rb', line 8 def parameters @parameters end |
#request_body ⇒ Object
Returns the value of attribute request_body.
8 9 10 |
# File 'lib/oas_core/spec/operation.rb', line 8 def request_body @request_body end |
#responses ⇒ Object
Returns the value of attribute responses.
8 9 10 |
# File 'lib/oas_core/spec/operation.rb', line 8 def responses @responses end |
#security ⇒ Object
Returns the value of attribute security.
8 9 10 |
# File 'lib/oas_core/spec/operation.rb', line 8 def security @security end |
#specification ⇒ Object
Returns the value of attribute specification.
8 9 10 |
# File 'lib/oas_core/spec/operation.rb', line 8 def specification @specification end |
#summary ⇒ Object
Returns the value of attribute summary.
8 9 10 |
# File 'lib/oas_core/spec/operation.rb', line 8 def summary @summary end |
#tags ⇒ Object
Returns the value of attribute tags.
8 9 10 |
# File 'lib/oas_core/spec/operation.rb', line 8 def @tags end |
Instance Method Details
#oas_fields ⇒ Object
23 24 25 |
# File 'lib/oas_core/spec/operation.rb', line 23 def oas_fields %i[tags summary description operation_id parameters request_body responses security] end |