public final class DisallowKeywordValidator extends AbstractTypeKeywordValidator
disallow keyword
disallow is the exact opposite of type,
and if the JSON instance matches either a primitive type or a schema
within this keyword's definition, validation fails.
FIXME: if a schema is a JSON reference and this reference does not resolve successfully, then this particular schema fails validation, and the logic is also inverted in that case. While the draft doesn't object this, it can be viewed as a bug.
schemas, typeSetkeyword| Constructor and Description |
|---|
DisallowKeywordValidator(JsonNode schema) |
| Modifier and Type | Method and Description |
|---|---|
void |
validate(ValidationContext context,
ValidationReport report,
JsonNode instance)
Method which all keyword validators must implement
|
toStringvalidateInstancepublic DisallowKeywordValidator(JsonNode schema)
public void validate(ValidationContext context, ValidationReport report, JsonNode instance)
KeywordValidatorvalidate in class KeywordValidatorcontext - the contextreport - the validation reportinstance - the instance to validateCopyright © 2012. All Rights Reserved.