public interface ValidatorFactory
Validator
. This is the entrypoint if you want to create a new custom keywordModifier and Type | Method and Description |
---|---|
boolean |
canConsumeSchema(JsonObject schema)
Returns true if this factory can consume the provided schema, eventually returning an instance of
Validator |
Validator |
createValidator(JsonObject schema,
JsonPointer scope,
SchemaParserInternal parser,
MutableStateValidator parent)
This method consume the schema eventually creating a new
Validator . |
Validator createValidator(JsonObject schema, JsonPointer scope, SchemaParserInternal parser, MutableStateValidator parent) throws SchemaException
Validator
. The schema parser calls it during schema parsing only if canConsumeSchema(JsonObject)
returns true
You can return any of SyncValidator
, AsyncValidator
or MutableStateValidator
schema
- JsonObject representing the schemascope
- scope of the parsed schemaparser
- caller parserparent
- parent of this schemaSchemaException
- if the keyword(s) handled by this ValidatorFactory are invalidboolean canConsumeSchema(JsonObject schema)
Validator
schema
- Copyright © 2021 Eclipse. All rights reserved.