Package com.networknt.schema
Class JsonSchemaFactory
- java.lang.Object
-
- com.networknt.schema.JsonSchemaFactory
-
public class JsonSchemaFactory extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonSchemaFactory.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static JsonSchemaFactory.Builder
builder(JsonSchemaFactory blueprint)
static com.networknt.schema.JsonSchemaVersion
checkVersion(SpecVersion.VersionFlag versionFlag)
protected ValidationContext
createValidationContext(com.fasterxml.jackson.databind.JsonNode schemaNode)
static JsonSchemaFactory
getInstance()
Deprecated.This is a method that is kept to ensure backward compatible.static JsonSchemaFactory
getInstance(SpecVersion.VersionFlag versionFlag)
JsonSchema
getSchema(com.fasterxml.jackson.databind.JsonNode jsonNode)
JsonSchema
getSchema(com.fasterxml.jackson.databind.JsonNode jsonNode, SchemaValidatorsConfig config)
JsonSchema
getSchema(InputStream schemaStream)
JsonSchema
getSchema(InputStream schemaStream, SchemaValidatorsConfig config)
JsonSchema
getSchema(String schema)
JsonSchema
getSchema(String schema, SchemaValidatorsConfig config)
JsonSchema
getSchema(URI schemaUri)
JsonSchema
getSchema(URI schemaUri, com.fasterxml.jackson.databind.JsonNode jsonNode)
JsonSchema
getSchema(URI schemaUri, com.fasterxml.jackson.databind.JsonNode jsonNode, SchemaValidatorsConfig config)
JsonSchema
getSchema(URI schemaUri, SchemaValidatorsConfig config)
URIFactory
getUriFactory()
protected JsonSchema
newJsonSchema(URI schemaUri, com.fasterxml.jackson.databind.JsonNode schemaNode, SchemaValidatorsConfig config)
protected static String
normalizeMetaSchemaUri(String u, boolean forceHttps, boolean removeEmptyFragmentSuffix)
-
-
-
Method Detail
-
getInstance
@Deprecated public static JsonSchemaFactory getInstance()
Deprecated.This is a method that is kept to ensure backward compatible. You shouldn't use it anymore. Please specify the draft version when get an instance.- Returns:
- JsonSchemaFactory
-
getInstance
public static JsonSchemaFactory getInstance(SpecVersion.VersionFlag versionFlag)
-
checkVersion
public static com.networknt.schema.JsonSchemaVersion checkVersion(SpecVersion.VersionFlag versionFlag)
-
builder
public static JsonSchemaFactory.Builder builder(JsonSchemaFactory blueprint)
-
newJsonSchema
protected JsonSchema newJsonSchema(URI schemaUri, com.fasterxml.jackson.databind.JsonNode schemaNode, SchemaValidatorsConfig config)
-
createValidationContext
protected ValidationContext createValidationContext(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
getUriFactory
public URIFactory getUriFactory()
- Returns:
- A shared
URI
factory that is used for creating the URI references in schemas.
-
getSchema
public JsonSchema getSchema(String schema, SchemaValidatorsConfig config)
-
getSchema
public JsonSchema getSchema(String schema)
-
getSchema
public JsonSchema getSchema(InputStream schemaStream, SchemaValidatorsConfig config)
-
getSchema
public JsonSchema getSchema(InputStream schemaStream)
-
getSchema
public JsonSchema getSchema(URI schemaUri, SchemaValidatorsConfig config)
-
getSchema
public JsonSchema getSchema(URI schemaUri)
-
getSchema
public JsonSchema getSchema(URI schemaUri, com.fasterxml.jackson.databind.JsonNode jsonNode, SchemaValidatorsConfig config)
-
getSchema
public JsonSchema getSchema(com.fasterxml.jackson.databind.JsonNode jsonNode, SchemaValidatorsConfig config)
-
getSchema
public JsonSchema getSchema(URI schemaUri, com.fasterxml.jackson.databind.JsonNode jsonNode)
-
getSchema
public JsonSchema getSchema(com.fasterxml.jackson.databind.JsonNode jsonNode)
-
-