Class: OpenAPIParser::SchemaValidator::AllOfValidator
- Defined in:
- lib/openapi_parser/schema_validators/all_of_validator.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#coerce_and_validate(value, schema) ⇒ Object
coerce and validate value.
Methods inherited from Base
Constructor Details
This class inherits a constructor from OpenAPIParser::SchemaValidator::Base
Instance Method Details
#coerce_and_validate(value, schema) ⇒ Object
coerce and validate value
7 8 9 10 11 12 13 14 |
# File 'lib/openapi_parser/schema_validators/all_of_validator.rb', line 7 def coerce_and_validate(value, schema) # if any schema return error, it's not valida all of value schema.all_of.each do |s| _coerced, err = validatable.validate_schema(value, s) return [nil, err] if err end [value, nil] end |