Package com.networknt.schema
Class JsonMetaSchema.Builder
java.lang.Object
com.networknt.schema.JsonMetaSchema.Builder
- Enclosing class:
JsonMetaSchema
Builder for
JsonMetaSchema.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.addFormats(Collection<? extends Format> formats) Deprecated.addKeyword(Keyword keyword) Deprecated.addKeywords(Collection<? extends Keyword> keywords) Deprecated.build()Adds the format.formatKeywordFactory(JsonMetaSchema.FormatKeywordFactory formatKeywordFactory) Sets the format keyword factory.formats(Collection<? extends Format> formats) Adds the formats.Customize the formats.Sets the id keyword.Adds the keyword.keywords(Collection<? extends Keyword> keywords) Adds the keywords.Customize the keywords.specification(SpecVersion.VersionFlag specification) Sets the specification.unknownKeywordFactory(KeywordFactory unknownKeywordFactory) Sets the keyword factory for handling unknown keywords.vocabularies(Consumer<Map<String, Boolean>> customizer) Customize the vocabularies.vocabularies(Map<String, Boolean> vocabularies) Adds the vocabularies.vocabulary(String vocabulary) Adds a required vocabulary.vocabulary(String vocabulary, boolean required) Adds a vocabulary.vocabularyFactory(VocabularyFactory vocabularyFactory) Sets the vocabulary factory for handling custom vocabularies.
-
Constructor Details
-
Builder
-
-
Method Details
-
formatKeywordFactory
public JsonMetaSchema.Builder formatKeywordFactory(JsonMetaSchema.FormatKeywordFactory formatKeywordFactory) Sets the format keyword factory.- Parameters:
formatKeywordFactory- the format keyword factory- Returns:
- the builder
-
vocabularyFactory
Sets the vocabulary factory for handling custom vocabularies.- Parameters:
vocabularyFactory- the factory- Returns:
- the builder
-
unknownKeywordFactory
Sets the keyword factory for handling unknown keywords.- Parameters:
unknownKeywordFactory- the factory- Returns:
- the builder
-
formats
Customize the formats.- Parameters:
customizer- the customizer- Returns:
- the builder
-
keywords
Customize the keywords.- Parameters:
customizer- the customizer- Returns:
- the builder
-
keyword
Adds the keyword.- Parameters:
keyword- the keyword- Returns:
- the builder
-
keywords
Adds the keywords.- Parameters:
keywords- the keywords- Returns:
- the builder
-
format
Adds the format.- Parameters:
format- the format- Returns:
- the builder
-
formats
Adds the formats.- Parameters:
formats- the formats- Returns:
- the builder
-
vocabulary
Adds a required vocabulary.Note that an error will be raised if this vocabulary is unknown.
- Parameters:
vocabulary- the vocabulary IRI- Returns:
- the builder
-
vocabulary
Adds a vocabulary.- Parameters:
vocabulary- the vocabulary IRIrequired- true indicates if the vocabulary is not recognized processing should stop- Returns:
- the builder
-
vocabularies
Adds the vocabularies.- Parameters:
vocabularies- the vocabularies to add- Returns:
- the builder
-
vocabularies
Customize the vocabularies.- Parameters:
customizer- the customizer- Returns:
- the builder
-
specification
Sets the specification.- Parameters:
specification- the specification- Returns:
- the builder
-
idKeyword
Sets the id keyword.- Parameters:
idKeyword- the id keyword- Returns:
- the builder
-
build
-
addKeyword
Deprecated. -
addKeywords
Deprecated. -
addFormat
Deprecated. -
addFormats
Deprecated.
-