class OpenAPIParser::SchemaValidator::NilValidator
Public Instance Methods
coerce_and_validate(value, schema, **_keyword_args)
click to toggle source
@param [Object] value @param [OpenAPIParser::Schemas::Schema] schema
# File lib/openapi_parser/schema_validators/nil_validator.rb, line 5 def coerce_and_validate(value, schema, **_keyword_args) return [value, nil] if schema.nullable [nil, OpenAPIParser::NotNullError.new(schema.object_reference)] end