Class: OpenapiFirst::Definition::Response
- Inherits:
-
Object
- Object
- OpenapiFirst::Definition::Response
- Defined in:
- lib/openapi_first/definition/response.rb
Instance Attribute Summary collapse
-
#content_schema ⇒ Object
readonly
Returns the value of attribute content_schema.
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #description ⇒ Object
- #headers ⇒ Object
-
#initialize(operation:, status:, response_object:, content_type:, content_schema:) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(operation:, status:, response_object:, content_type:, content_schema:) ⇒ Response
Returns a new instance of Response.
6 7 8 9 10 11 12 |
# File 'lib/openapi_first/definition/response.rb', line 6 def initialize(operation:, status:, response_object:, content_type:, content_schema:) @operation = operation @response_object = response_object @status = status @content_type = content_type @content_schema = content_schema end |
Instance Attribute Details
#content_schema ⇒ Object (readonly)
Returns the value of attribute content_schema.
14 15 16 |
# File 'lib/openapi_first/definition/response.rb', line 14 def content_schema @content_schema end |
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
14 15 16 |
# File 'lib/openapi_first/definition/response.rb', line 14 def content_type @content_type end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
14 15 16 |
# File 'lib/openapi_first/definition/response.rb', line 14 def operation @operation end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
14 15 16 |
# File 'lib/openapi_first/definition/response.rb', line 14 def status @status end |
Instance Method Details
#description ⇒ Object
20 21 22 |
# File 'lib/openapi_first/definition/response.rb', line 20 def description @response_object['description'] end |
#headers ⇒ Object
16 17 18 |
# File 'lib/openapi_first/definition/response.rb', line 16 def headers @response_object['headers'] end |