Package com.networknt.schema
Class SchemaContext
java.lang.Object
com.networknt.schema.SchemaContext
The schema context associated with a schema and all its validators.
-
Constructor Summary
ConstructorsConstructorDescriptionSchemaContext(Dialect dialect, SchemaRegistry schemaRegistry) SchemaContext(Dialect dialect, SchemaRegistry schemaRegistry, ConcurrentMap<String, Schema> schemaReferences, ConcurrentMap<String, Schema> schemaResources, ConcurrentMap<String, Schema> dynamicAnchors) -
Method Summary
Modifier and TypeMethodDescriptionGets the dynamic anchors.Gets the schema references identified by the ref uri.Gets the schema resources identified by id.booleanbooleannewSchema(SchemaLocation schemaLocation, com.fasterxml.jackson.databind.JsonNode schemaNode, Schema parentSchema) newValidator(SchemaLocation schemaLocation, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, Schema parentSchema) resolveSchemaId(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
Constructor Details
-
SchemaContext
-
SchemaContext
public SchemaContext(Dialect dialect, SchemaRegistry schemaRegistry, ConcurrentMap<String, Schema> schemaReferences, ConcurrentMap<String, Schema> schemaResources, ConcurrentMap<String, Schema> dynamicAnchors)
-
-
Method Details
-
newSchema
public Schema newSchema(SchemaLocation schemaLocation, com.fasterxml.jackson.databind.JsonNode schemaNode, Schema parentSchema) -
newValidator
public KeywordValidator newValidator(SchemaLocation schemaLocation, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, Schema parentSchema) -
resolveSchemaId
-
getSchemaRegistry
-
getSchemaRegistryConfig
-
getSchemaReferences
Gets the schema references identified by the ref uri.- Returns:
- the schema references
-
getSchemaResources
Gets the schema resources identified by id.- Returns:
- the schema resources
-
getDynamicAnchors
Gets the dynamic anchors.- Returns:
- the dynamic anchors
-
getDialect
-
isDiscriminatorKeywordEnabled
public boolean isDiscriminatorKeywordEnabled() -
isNullableKeywordEnabled
public boolean isNullableKeywordEnabled()
-