JSONSchema::FluentValidatorGenericProperties
Contains fluent methods for interfacing with generic json-schema properties such as enum and composite schemas.
Instance methods
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.