Class: OpenapiValidator::ResponseValidator::JsonValidator
- Inherits:
-
Object
- Object
- OpenapiValidator::ResponseValidator::JsonValidator
- Defined in:
- lib/openapi_validator/response_validators/json_validator.rb
Instance Method Summary collapse
-
#initialize(schema:, data:, fragment:, media_type:, response:) ⇒ JsonValidator
constructor
A new instance of JsonValidator.
- #validate ⇒ Object
Constructor Details
#initialize(schema:, data:, fragment:, media_type:, response:) ⇒ JsonValidator
Returns a new instance of JsonValidator.
4 5 6 7 8 9 10 |
# File 'lib/openapi_validator/response_validators/json_validator.rb', line 4 def initialize(schema:, data:, fragment:, media_type:, response:) @schema = schema @data = data @fragment = fragment @media_type = media_type @response = response end |
Instance Method Details
#validate ⇒ Object
12 13 14 |
# File 'lib/openapi_validator/response_validators/json_validator.rb', line 12 def validate OpenapiValidator::JsonValidator.fully_validate(schema, data, fragment: fragment, response: response) end |