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.Builder
-
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)static JsonMetaSchemagetDraftV4()StringgetUri()JsonValidatornewValidator(ValidationContext validationContext, String schemaPath, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema)StringreadId(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
-
-
Method Detail
-
getDraftV4
public static JsonMetaSchema getDraftV4()
-
builder
public static JsonMetaSchema.Builder builder(String uri)
Builder without keywords or formats. UsegetDraftV4()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.
-
readId
public String readId(com.fasterxml.jackson.databind.JsonNode schemaNode)
-
getUri
public String getUri()
-
newValidator
public JsonValidator newValidator(ValidationContext validationContext, String schemaPath, String keyword, com.fasterxml.jackson.databind.JsonNode schemaNode, JsonSchema parentSchema)
-
-