Package com.networknt.schema
Class RecursiveRefValidator
- java.lang.Object
-
- com.networknt.schema.ValidationMessageHandler
-
- com.networknt.schema.BaseJsonValidator
-
- com.networknt.schema.RecursiveRefValidator
-
- All Implemented Interfaces:
JsonValidator
,JsonSchemaWalker
public class RecursiveRefValidator extends BaseJsonValidator
-
-
Field Summary
-
Fields inherited from class com.networknt.schema.BaseJsonValidator
applyDefaultsStrategy, schemaNode, suppressSubSchemaRetrieval, validationContext
-
Fields inherited from class com.networknt.schema.ValidationMessageHandler
customErrorMessagesEnabled, errorMessage, errorMessageType, evaluationParentSchema, evaluationPath, failFast, keyword, messageSource, parentSchema, schemaLocation
-
-
Constructor Summary
Constructors Constructor Description RecursiveRefValidator(SchemaLocation schemaLocation, JsonNodePath evaluationPath, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema, ValidationContext validationContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<ValidationMessage>
validate(ExecutionContext executionContext, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode rootNode, JsonNodePath instanceLocation)
Validate the given JsonNode, the given node is the child node of the root node at given data path.Set<ValidationMessage>
walk(ExecutionContext executionContext, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode rootNode, JsonNodePath instanceLocation, boolean shouldValidateSchema)
This is default implementation of walk method.-
Methods inherited from class com.networknt.schema.BaseJsonValidator
atRoot, checkDiscriminatorMatch, debug, equals, fetchSubSchemaNode, getEvaluationParentSchema, getEvaluationPath, getKeyword, getNodeFieldType, getParentSchema, getSchemaLocation, getSchemaNode, preloadJsonSchemas, registerAndMergeDiscriminator, toString, validate, validate, validate
-
Methods inherited from class com.networknt.schema.ValidationMessageHandler
getErrorCodeKey, getErrorMessage, getErrorMessageType, getMessageNode, isPartOfOneOfMultipleType, message, parseErrorCode, schemaLocationContains, updateErrorMessageType, updateKeyword, updateValidatorType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.networknt.schema.JsonValidator
preloadJsonSchema
-
-
-
-
Constructor Detail
-
RecursiveRefValidator
public RecursiveRefValidator(SchemaLocation schemaLocation, JsonNodePath evaluationPath, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema, ValidationContext validationContext)
-
-
Method Detail
-
validate
public Set<ValidationMessage> validate(ExecutionContext executionContext, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode rootNode, JsonNodePath instanceLocation)
Description copied from interface:JsonValidator
Validate the given JsonNode, the given node is the child node of the root node at given data path.- Parameters:
executionContext
- ExecutionContextnode
- JsonNoderootNode
- JsonNodeinstanceLocation
- JsonNodePath- Returns:
- A list of ValidationMessage if there is any validation error, or an empty list if there is no error.
-
walk
public Set<ValidationMessage> walk(ExecutionContext executionContext, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode rootNode, JsonNodePath instanceLocation, boolean shouldValidateSchema)
Description copied from interface:JsonValidator
This is default implementation of walk method. Its job is to call the validate method if shouldValidateSchema is enabled.- Parameters:
executionContext
- ExecutionContextnode
- JsonNoderootNode
- JsonNodeinstanceLocation
- JsonNodePathshouldValidateSchema
- boolean- Returns:
- a set of validation messages if shouldValidateSchema is true.
-
-