public final class RequiredKeywordValidator extends KeywordValidator
required keyword
In draft v3, this keyword was attached to a schema defined by the properties keyword. In draft v4, it is a "first-level" citizen. Its value
is a set of property names which the object instance must contain in order
to validate successfully.
keyword| Constructor and Description |
|---|
RequiredKeywordValidator(JsonNode schema) |
| Modifier and Type | Method and Description |
|---|---|
String |
toString() |
protected void |
validate(ValidationContext context,
ValidationReport report,
JsonNode instance)
Method which all keyword validators must implement
|
alwaysTrue, newMsg, validateInstancepublic RequiredKeywordValidator(JsonNode schema)
protected void validate(ValidationContext context, ValidationReport report, JsonNode instance)
KeywordValidatorvalidate in class KeywordValidatorcontext - the contextreport - the validation reportinstance - the instance to validatepublic String toString()
toString in class KeywordValidatorCopyright © 2013. All Rights Reserved.