module JSONSchema::FluentValidatorGenericProperties
Overview
Contains fluent methods for interfacing with generic json-schema properties such as enum and composite schemas.
Direct including types
- JSONSchema::FluentArrayValidator
- JSONSchema::FluentGenericValidator
- JSONSchema::FluentNumberValidator
- JSONSchema::FluentObjectValidator
- JSONSchema::FluentStringValidator
Defined in:
fluent.crInstance Method Summary
-
#all_of(*children)
Constraint that all of the passed schemas must be valid given the input JSON.
-
#any_of(*children)
Constraint that at least one of the passed schemas must be valid given the input JSON.
-
#enum_list(*values)
Set a list of values that are allowed for this schema.
-
#not(*children)
Constraint that the passed schema is not valid given the input JSON.
-
#one_of(*children)
Constraint that only one of the passed schemas is valid given the input JSON.
Instance Method Detail
Constraint that all of the passed schemas must be valid given the input JSON. Accepts any number of children as JSONSchema::Validator
objects.
Constraint that at least one of the passed schemas must be valid given the input JSON. Accepts any number of children as JSONSchema::Validator
objects.
Set a list of values that are allowed for this schema. This method is not called enum
to avoid conflicting with the enum
keyword.
validator = JSONSchema.generic do
enum_list "one", "two", "three"
end
Constraint that the passed schema is not valid given the input JSON. Accepts any number of children as JSONSchema::Validator
objects.
Constraint that only one of the passed schemas is valid given the input JSON. Accepts any number of children as JSONSchema::Validator
objects.