Class UnionTypeValidator

All Implemented Interfaces:
KeywordValidator, Validator, Walker

public class UnionTypeValidator extends BaseKeywordValidator implements KeywordValidator
KeywordValidator for type union.
  • Constructor Details

    • UnionTypeValidator

      public UnionTypeValidator(SchemaLocation schemaLocation, com.fasterxml.jackson.databind.JsonNode schemaNode, Schema parentSchema, SchemaContext schemaContext)
  • Method Details

    • validate

      public void validate(ExecutionContext executionContext, com.fasterxml.jackson.databind.JsonNode node, com.fasterxml.jackson.databind.JsonNode rootNode, NodePath instanceLocation)
      Description copied from interface: Validator
      Validate the instance node which belongs to the instance document at the instance location.
      Specified by:
      validate in interface Validator
      Parameters:
      executionContext - the execution context
      node - the instance node being processed
      rootNode - the instance document that the instance node belongs to
      instanceLocation - the location of the instance node being processed
    • preloadSchema

      public void preloadSchema()
      Description copied from interface: KeywordValidator
      In case the KeywordValidator has a related Schema or several ones, calling preloadSchema will actually load the schema document(s) eagerly.
      Specified by:
      preloadSchema in interface KeywordValidator
    • getKeyword

      public String getKeyword()
      Description copied from interface: KeywordValidator
      The keyword of the validator.
      Specified by:
      getKeyword in interface KeywordValidator
      Overrides:
      getKeyword in class AbstractKeywordValidator
      Returns:
      the keyword