Interface Validator

All Superinterfaces:
Walker
All Known Subinterfaces:
KeywordValidator
All Known Implementing Classes:
AbstractKeywordValidator, AdditionalPropertiesValidator, AllOfValidator, AnyOfValidator, BaseFormatValidator, BaseKeywordValidator, ConstValidator, ContainsValidator, ContentEncodingValidator, ContentMediaTypeValidator, DependenciesValidator, DependentRequired, DependentSchemas, DiscriminatorValidator, DynamicRefValidator, EnumValidator, ExclusiveMaximumValidator, ExclusiveMinimumValidator, FalseValidator, FormatValidator, IfValidator, ItemsLegacyValidator, ItemsValidator, MaximumValidator, MaxItemsValidator, MaxLengthValidator, MaxPropertiesValidator, MinimumValidator, MinItemsValidator, MinLengthValidator, MinMaxContainsValidator, MinPropertiesValidator, MultipleOfValidator, NotAllowedValidator, NotValidator, OneOfValidator, PatternPropertiesValidator, PatternValidator, PrefixItemsValidator, PropertiesValidator, PropertyDependenciesValidator, PropertyNamesValidator, ReadOnlyValidator, RecursiveRefValidator, RefValidator, RequiredValidator, Schema, TrueValidator, TypeValidator, UnevaluatedItemsValidator, UnevaluatedPropertiesValidator, UnionTypeValidator, UniqueItemsValidator, WriteOnlyValidator

public interface Validator extends Walker
A processor that checks an instance node belonging to an instance document against a schema.
  • Method Summary

    Modifier and Type
    Method
    Description
    The schema location is the canonical URI of the schema object plus a JSON Pointer fragment indicating the subschema that produced a result.
    void
    validate(ExecutionContext executionContext, com.fasterxml.jackson.databind.JsonNode instanceNode, com.fasterxml.jackson.databind.JsonNode instance, NodePath instanceLocation)
    Validate the instance node which belongs to the instance document at the instance location.
    default void
    walk(ExecutionContext executionContext, com.fasterxml.jackson.databind.JsonNode instanceNode, com.fasterxml.jackson.databind.JsonNode instance, NodePath instanceLocation, boolean shouldValidateSchema)
    This is default implementation of walk method.
  • Method Details

    • validate

      void validate(ExecutionContext executionContext, com.fasterxml.jackson.databind.JsonNode instanceNode, com.fasterxml.jackson.databind.JsonNode instance, NodePath instanceLocation)
      Validate the instance node which belongs to the instance document at the instance location.
      Parameters:
      executionContext - the execution context
      instanceNode - the instance node being processed
      instance - the instance document that the instance node belongs to
      instanceLocation - the location of the instance node being processed
    • walk

      default void walk(ExecutionContext executionContext, com.fasterxml.jackson.databind.JsonNode instanceNode, com.fasterxml.jackson.databind.JsonNode instance, NodePath instanceLocation, boolean shouldValidateSchema)
      This is default implementation of walk method. Its job is to call the validate method if shouldValidateSchema is enabled.
      Specified by:
      walk in interface Walker
      Parameters:
      executionContext - the execution context
      instanceNode - the instance node being processed
      instance - the instance document that the instance node belongs to
      instanceLocation - the location of the instance node being processed
      shouldValidateSchema - true to validate the schema while walking
    • getSchemaLocation

      SchemaLocation getSchemaLocation()
      The schema location is the canonical URI of the schema object plus a JSON Pointer fragment indicating the subschema that produced a result. In contrast with the evaluation path, the schema location MUST NOT include by-reference applicators such as $ref or $dynamicRef.
      Returns:
      the schema location