Class: OasRails::Spec::RequestBody
- Inherits:
-
Object
- Object
- OasRails::Spec::RequestBody
- Defined in:
- lib/oas_rails/spec/request_body.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#description ⇒ Object
Returns the value of attribute description.
-
#required ⇒ Object
Returns the value of attribute required.
Instance Method Summary collapse
-
#initialize(specification) ⇒ RequestBody
constructor
A new instance of RequestBody.
- #oas_fields ⇒ Object
Methods included from Hashable
generate_hash, #hash_key, #hash_representation, hash_representation_recursive, #public_instance_variables
Methods included from Specable
Constructor Details
#initialize(specification) ⇒ RequestBody
Returns a new instance of RequestBody.
9 10 11 12 13 14 |
# File 'lib/oas_rails/spec/request_body.rb', line 9 def initialize(specification) @specification = specification @description = "" @content = {} # a hash with media type objects @required = false end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
7 8 9 |
# File 'lib/oas_rails/spec/request_body.rb', line 7 def content @content end |
#description ⇒ Object
Returns the value of attribute description.
7 8 9 |
# File 'lib/oas_rails/spec/request_body.rb', line 7 def description @description end |
#required ⇒ Object
Returns the value of attribute required.
7 8 9 |
# File 'lib/oas_rails/spec/request_body.rb', line 7 def required @required end |
Instance Method Details
#oas_fields ⇒ Object
16 17 18 |
# File 'lib/oas_rails/spec/request_body.rb', line 16 def oas_fields [:description, :content, :required] end |