Class: OpenAPIParser::Schemas::Operation
- Includes:
- ParameterValidatable
- Defined in:
- lib/openapi_parser/schemas/classes.rb,
lib/openapi_parser/schemas/operation.rb
Instance Attribute Summary collapse
-
#request_body ⇒ OpenAPIParser::Schemas::RequestBody?
readonly
Return OpenAPI3 object.
-
#responses ⇒ OpenAPIParser::Schemas::Responses?
readonly
Return OpenAPI3 object.
Attributes inherited from Base
#object_reference, #parent, #raw_schema, #root
Instance Method Summary collapse
- #validate_request_body(content_type, params, options) ⇒ Object
- #validate_response(response_body, response_validate_options) ⇒ Object
Methods included from ParameterValidatable
#set_parent_path_item, #validate_path_params, #validate_request_parameter
Methods inherited from Base
#after_init, #initialize, #inspect
Methods included from Expandable
Methods included from Findable
#find_object, #purge_object_cache
Methods included from Parser
#_openapi_all_child_objects, #_update_child_object, included, #load_data
Constructor Details
This class inherits a constructor from OpenAPIParser::Schemas::Base
Instance Attribute Details
#request_body ⇒ OpenAPIParser::Schemas::RequestBody? (readonly)
Return OpenAPI3 object
18 |
# File 'lib/openapi_parser/schemas/operation.rb', line 18 openapi_attr_object :request_body, RequestBody, reference: true, schema_key: :requestBody |
#responses ⇒ OpenAPIParser::Schemas::Responses? (readonly)
Return OpenAPI3 object
22 |
# File 'lib/openapi_parser/schemas/operation.rb', line 22 openapi_attr_object :responses, Responses, reference: false |
Instance Method Details
#validate_request_body(content_type, params, options) ⇒ Object
24 25 26 |
# File 'lib/openapi_parser/schemas/operation.rb', line 24 def validate_request_body(content_type, params, ) request_body&.validate_request_body(content_type, params, ) end |
#validate_response(response_body, response_validate_options) ⇒ Object
30 31 32 |
# File 'lib/openapi_parser/schemas/operation.rb', line 30 def validate_response(response_body, ) responses&.validate(response_body, ) end |