Class BaseJsonValidator

    • Field Detail

      • config

        protected SchemaValidatorsConfig config
        SchemaValidatorsConfig can only get and set in validationContext
    • Constructor Detail

      • BaseJsonValidator

        public BaseJsonValidator​(String schemaPath,
                                 com.fasterxml.jackson.databind.JsonNode schemaNode,
                                 JsonSchema parentSchema,
                                 ValidatorTypeCode validatorType,
                                 boolean suppressSubSchemaRetrieval)
    • Method Detail

      • getSchemaPath

        protected String getSchemaPath()
      • getSchemaNode

        public com.fasterxml.jackson.databind.JsonNode getSchemaNode()
      • getParentSchema

        protected JsonSchema getParentSchema()
      • validate

        public Set<ValidationMessage> validate​(com.fasterxml.jackson.databind.JsonNode node)
        Description copied from interface: JsonValidator
        Validate the given root JsonNode, starting at the root of the data path.
        Specified by:
        validate in interface JsonValidator
        Parameters:
        node - JsonNode
        Returns:
        A list of ValidationMessage if there is any validation error, or an empty list if there is no error.
      • equals

        protected boolean equals​(double n1,
                                 double n2)
      • greaterThan

        protected boolean greaterThan​(double n1,
                                      double n2)
      • lessThan

        protected boolean lessThan​(double n1,
                                   double n2)
      • parseErrorCode

        protected void parseErrorCode​(String errorCodeKey)
      • debug

        protected void debug​(org.slf4j.Logger logger,
                             com.fasterxml.jackson.databind.JsonNode node,
                             com.fasterxml.jackson.databind.JsonNode rootNode,
                             String at)
      • getNodeFieldType

        protected String getNodeFieldType()