public final class AdditionalItemsKeywordValidator extends KeywordValidator
additionalItems keyword
Note that this keyword only handles validation at the instance level: it does not validate children.
The rules are:
items is a schema, validation always succeeds, since all
items in the array have to obey its schema;additionalItems is either true or a schema,
validation succeeds;items is an array of schemas (tuple validation) and additionalItems is false, validation succeeds if and only if the
number of elements in the array instance is less than or equal to the
number of schemas in items.keyword| Constructor and Description |
|---|
AdditionalItemsKeywordValidator(JsonNode schema) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
alwaysTrue() |
String |
toString() |
void |
validate(ValidationContext context,
ValidationReport report,
JsonNode instance)
Method which all keyword validators must implement
|
newMsg, validateInstancepublic AdditionalItemsKeywordValidator(JsonNode schema)
public void validate(ValidationContext context, ValidationReport report, JsonNode instance)
KeywordValidatorvalidate in class KeywordValidatorcontext - the contextreport - the validation reportinstance - the instance to validatepublic boolean alwaysTrue()
alwaysTrue in class KeywordValidatorpublic String toString()
toString in class KeywordValidatorCopyright © 2013. All Rights Reserved.