Package com.networknt.schema
Class JsonMetaSchema
- java.lang.Object
-
- com.networknt.schema.JsonMetaSchema
-
public class JsonMetaSchema extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJsonMetaSchema.Builderstatic interfaceJsonMetaSchema.FormatKeywordFactory
-
Field Summary
Fields Modifier and Type Field Description static List<Format>COMMON_BUILTIN_FORMATS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonMetaSchema.Builderbuilder(String uri)Builder without keywords or formats.static JsonMetaSchema.Builderbuilder(String uri, JsonMetaSchema blueprint)StringgetIdKeyword()Map<String,Keyword>getKeywords()SpecVersion.VersionFlaggetSpecification()StringgetUri()static JsonMetaSchemagetV201909()static JsonMetaSchemagetV202012()static JsonMetaSchemagetV4()static JsonMetaSchemagetV6()static JsonMetaSchemagetV7()Map<String,Boolean>getVocabularies()JsonValidatornewValidator(ValidationContext validationContext, SchemaLocation schemaLocation, JsonNodePath evaluationPath, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema)StringreadAnchor(com.fasterxml.jackson.databind.JsonNode schemaNode)StringreadDynamicAnchor(com.fasterxml.jackson.databind.JsonNode schemaNode)StringreadId(com.fasterxml.jackson.databind.JsonNode schemaNode)StringtoString()
-
-
-
Method Detail
-
getV4
public static JsonMetaSchema getV4()
-
getV6
public static JsonMetaSchema getV6()
-
getV7
public static JsonMetaSchema getV7()
-
getV201909
public static JsonMetaSchema getV201909()
-
getV202012
public static JsonMetaSchema getV202012()
-
builder
public static JsonMetaSchema.Builder builder(String uri)
Builder without keywords or formats.Use
getV4()for the Draft 4 Metaschema, or if you need a builder based on Draft4, useJsonMetaSchema.builder("http://your-metaschema-uri", JsonSchemaFactory.getDraftV4()).build();- Parameters:
uri- the URI of the metaschema that will be defined via this builder.- Returns:
- a builder instance without any keywords or formats - usually not what one needs.
-
builder
public static JsonMetaSchema.Builder builder(String uri, JsonMetaSchema blueprint)
- Parameters:
uri- the URI of your new JsonMetaSchema that will be defined via this builder.blueprint- the JsonMetaSchema to base your custom JsonMetaSchema on.- Returns:
- a builder instance preconfigured to be the same as blueprint, but with a different uri.
-
getIdKeyword
public String getIdKeyword()
-
readId
public String readId(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
readAnchor
public String readAnchor(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
readDynamicAnchor
public String readDynamicAnchor(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
getUri
public String getUri()
-
getSpecification
public SpecVersion.VersionFlag getSpecification()
-
newValidator
public JsonValidator newValidator(ValidationContext validationContext, SchemaLocation schemaLocation, JsonNodePath evaluationPath, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema)
-
-