Class OneOfValidator

    • Constructor Detail

      • OneOfValidator

        public OneOfValidator​(SchemaLocation schemaLocation,
                              com.fasterxml.jackson.databind.JsonNode schemaNode,
                              Schema parentSchema,
                              SchemaContext schemaContext)
    • Method Detail

      • 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.
        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
      • validate

        protected void validate​(ExecutionContext executionContext,
                                com.fasterxml.jackson.databind.JsonNode node,
                                com.fasterxml.jackson.databind.JsonNode rootNode,
                                NodePath instanceLocation,
                                boolean walk)
      • reportChildErrors

        protected boolean reportChildErrors​(ExecutionContext executionContext)
        Determines if child errors should be reported.
        Parameters:
        executionContext - the execution context
        Returns:
        true if child errors should be reported
      • canShortCircuit

        protected boolean canShortCircuit​(ExecutionContext executionContext)
      • walk

        public void walk​(ExecutionContext executionContext,
                         com.fasterxml.jackson.databind.JsonNode node,
                         com.fasterxml.jackson.databind.JsonNode rootNode,
                         NodePath instanceLocation,
                         boolean shouldValidateSchema)
        Description copied from interface: Validator
        This is default implementation of walk method. Its job is to call the validate method if shouldValidateSchema is enabled.
        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
        shouldValidateSchema - true to validate the schema while walking
      • 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.