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
-
objectMapper
public JsonSchemaFactory.Builder objectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
yamlMapper
public JsonSchemaFactory.Builder yamlMapper(com.fasterxml.jackson.dataformat.yaml.YAMLMapper yamlMapper)
-
defaultMetaSchemaURI
public JsonSchemaFactory.Builder defaultMetaSchemaURI(String defaultMetaSchemaURI)
-
uriFactory
public JsonSchemaFactory.Builder uriFactory(URIFactory uriFactory, String... schemes)
Maps a number of schemes to aURIFactory
.- Parameters:
uriFactory
- the uri factory that will be used for the given schemes.schemes
- the scheme that the uri factory will be assocaited with.- Returns:
- this builder.
-
uriFactory
public JsonSchemaFactory.Builder uriFactory(URIFactory uriFactory, Iterable<String> schemes)
-
uriFetcher
public JsonSchemaFactory.Builder uriFetcher(URIFetcher uriFetcher, String... schemes)
Maps a number of schemes to aURIFetcher
.- Parameters:
uriFetcher
- the uri fetcher that will be used for the given schemes.schemes
- the scheme that the uri fetcher will be assocaited with.- Returns:
- this builder.
-
uriFetcher
public JsonSchemaFactory.Builder uriFetcher(URIFetcher uriFetcher, Iterable<String> schemes)
-
addMetaSchema
public JsonSchemaFactory.Builder addMetaSchema(JsonMetaSchema jsonMetaSchema)
-
addMetaSchemas
public JsonSchemaFactory.Builder addMetaSchemas(Collection<? extends JsonMetaSchema> jsonMetaSchemas)
-
addUriMappings
@Deprecated public JsonSchemaFactory.Builder addUriMappings(Map<String,String> map)
Deprecated.UseaddUriTranslator
instead.- Parameters:
map
- the map of uri mappings.- Returns:
- this builder.
-
addUriTranslator
public JsonSchemaFactory.Builder addUriTranslator(URITranslator translator)
-
addUrnFactory
public JsonSchemaFactory.Builder addUrnFactory(URNFactory urnFactory)
-
forceHttps
public JsonSchemaFactory.Builder forceHttps(boolean forceHttps)
Deprecated.No longer necessary.- Parameters:
forceHttps
- ignored.- Returns:
- this builder.
-
removeEmptyFragmentSuffix
public JsonSchemaFactory.Builder removeEmptyFragmentSuffix(boolean removeEmptyFragmentSuffix)
Deprecated.No longer necessary.- Parameters:
removeEmptyFragmentSuffix
- ignored.- Returns:
- this builder.
-
enableUriSchemaCache
public JsonSchemaFactory.Builder enableUriSchemaCache(boolean enableUriSchemaCache)
-
build
public JsonSchemaFactory build()
-
-