Class: OpenAPIParser::SchemaValidator::FloatValidator
- Includes:
- Enumable, MinimumMaximum
- Defined in:
- lib/openapi_parser/schema_validator/float_validator.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#coerce_and_validate(value, schema, **_keyword_args) ⇒ Object
validate float value by schema.
Methods included from MinimumMaximum
Methods included from Enumable
Methods inherited from Base
#initialize, #validate_discriminator_schema
Constructor Details
This class inherits a constructor from OpenAPIParser::SchemaValidator::Base
Instance Method Details
#coerce_and_validate(value, schema, **_keyword_args) ⇒ Object
validate float value by schema
9 10 11 12 13 14 15 |
# File 'lib/openapi_parser/schema_validator/float_validator.rb', line 9 def coerce_and_validate(value, schema, **_keyword_args) value = coerce(value) if @coerce_value return validatable.validate_integer(value, schema) if value.kind_of?(Integer) coercer_and_validate_numeric(value, schema) end |