public interface SchemaRepository
| Modifier and Type | Method and Description |
|---|---|
static SchemaRepository |
create(JsonSchemaOptions options)
Create a repository with some initial configuration.
|
SchemaRepository |
dereference(JsonSchema schema)
Dereferences a schema to the repository.
|
SchemaRepository |
dereference(String uri,
JsonSchema schema)
Dereferences a schema to the repository.
|
JsonSchema |
find(String pointer)
Look up a schema using a JSON pointer notation
|
JsonObject |
resolve(JsonSchema schema)
Tries to resolve all internal and repository local references.
|
JsonObject |
resolve(String ref)
Tries to resolve all internal and repository local references.
|
Validator |
validator(JsonSchema schema)
A new validator instance using this repository options.
|
Validator |
validator(JsonSchema schema,
JsonSchemaOptions options)
A new validator instance overriding this repository options.
|
Validator |
validator(String ref)
A new validator instance using this repository options.
|
Validator |
validator(String ref,
JsonSchemaOptions options)
A new validator instance overriding this repository options.
|
static SchemaRepository create(JsonSchemaOptions options)
options - the initial configurationSchemaRepository dereference(JsonSchema schema) throws SchemaException
schema - a new schema to listSchemaException - when a schema is already present for the same idSchemaRepository dereference(String uri, JsonSchema schema) throws SchemaException
uri - the source of the schema used for de-referencing, optionally relative to
JsonSchemaOptions.getBaseUri().schema - a new schema to listSchemaException - when a schema is already present for the same idValidator validator(JsonSchema schema)
schema - the start validation schemaValidator validator(String ref)
ref - the start validation reference in JSON pointer formatValidator validator(JsonSchema schema, JsonSchemaOptions options)
schema - the start validation schemaoptions - the options to be using on the validator instanceValidator validator(String ref, JsonSchemaOptions options)
ref - the start validation reference in JSON pointer formatoptions - the options to be using on the validator instanceJsonObject resolve(JsonSchema schema)
JsonObject representing the schema with $refs replaced by their value.SchemaException - when the resolution is impossible. One of such cases is circular referencing.JsonObject resolve(String ref)
ref - the start resolution reference in JSON pointer formatJsonObject representing the schema with $refs replaced by their value.SchemaException - when the resolution is impossible. One of such cases is circular referencing.JsonSchema find(String pointer)
pointer - the JSON pointerCopyright © 2023 Eclipse. All rights reserved.