public final class SyntaxValidator extends Object
This is the syntax validator built, and returned, by JsonSchemaFactory.getSyntaxValidator(). It can be used to validate schemas
independently of the validation chain. Among other features, it detects
$schema and acts accordingly.
Note that the reports used are always ListProcessingReports.
| Constructor and Description |
|---|
SyntaxValidator(ValidationConfiguration cfg)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Processor<ValueHolder<SchemaTree>,ValueHolder<SchemaTree>> |
getProcessor()
Return the underlying processor
|
boolean |
schemaIsValid(JsonNode schema)
Tell whether a schema is valid
|
ProcessingReport |
validateSchema(JsonNode schema)
Validate a schema and return a report
|
public SyntaxValidator(ValidationConfiguration cfg)
cfg - the validation configuration to usepublic boolean schemaIsValid(JsonNode schema)
schema - the schemapublic ProcessingReport validateSchema(JsonNode schema)
schema - the schemapublic Processor<ValueHolder<SchemaTree>,ValueHolder<SchemaTree>> getProcessor()
You can use this processor to chain it with your own.