Package com.networknt.schema
Class JsonSchemaFactory.Builder
- java.lang.Object
-
- com.networknt.schema.JsonSchemaFactory.Builder
-
- Enclosing class:
- JsonSchemaFactory
public static class JsonSchemaFactory.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
jsonNodeReader
public JsonSchemaFactory.Builder jsonNodeReader(JsonNodeReader jsonNodeReader)
Sets the json node reader to read the data.If set this takes precedence over the configured json mapper and yaml mapper.
A location aware object reader can be created using JsonNodeReader.builder().locationAware().build().
- Parameters:
jsonNodeReader
- the object reader- Returns:
- the builder
-
jsonMapper
@Deprecated public JsonSchemaFactory.Builder jsonMapper(com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
Deprecated.Sets the json mapper to read the data.If the object reader is set this will not be used.
This is deprecated use a object reader instead.
- Parameters:
jsonMapper
- the json mapper- Returns:
- the builder
-
yamlMapper
@Deprecated public JsonSchemaFactory.Builder yamlMapper(com.fasterxml.jackson.databind.ObjectMapper yamlMapper)
Deprecated.Sets the yaml mapper to read the data.If the object reader is set this will not be used.
This is deprecated use a object reader instead.
- Parameters:
yamlMapper
- the yaml mapper- Returns:
- the builder
-
defaultMetaSchemaIri
public JsonSchemaFactory.Builder defaultMetaSchemaIri(String defaultMetaSchemaIri)
-
metaSchemaFactory
public JsonSchemaFactory.Builder metaSchemaFactory(JsonMetaSchemaFactory jsonMetaSchemaFactory)
-
metaSchema
public JsonSchemaFactory.Builder metaSchema(JsonMetaSchema jsonMetaSchema)
-
metaSchemas
public JsonSchemaFactory.Builder metaSchemas(Collection<? extends JsonMetaSchema> jsonMetaSchemas)
-
metaSchemas
public JsonSchemaFactory.Builder metaSchemas(Consumer<Map<String,JsonMetaSchema>> customizer)
-
enableSchemaCache
public JsonSchemaFactory.Builder enableSchemaCache(boolean enableSchemaCache)
-
schemaLoaders
public JsonSchemaFactory.Builder schemaLoaders(Consumer<SchemaLoaders.Builder> schemaLoadersBuilderCustomizer)
-
schemaMappers
public JsonSchemaFactory.Builder schemaMappers(Consumer<SchemaMappers.Builder> schemaMappersBuilderCustomizer)
-
addMetaSchema
@Deprecated public JsonSchemaFactory.Builder addMetaSchema(JsonMetaSchema jsonMetaSchema)
Deprecated.
-
addMetaSchemas
@Deprecated public JsonSchemaFactory.Builder addMetaSchemas(Collection<? extends JsonMetaSchema> jsonMetaSchemas)
Deprecated.
-
build
public JsonSchemaFactory build()
-
-