Package dev.harrel.jsonschema
Interface Dialect
- All Known Implementing Classes:
Dialects.Draft2019Dialect,Dialects.Draft2020Dialect,Dialects.Draft7Dialect
public interface Dialect
Dialect interface is the main abstraction for a specific (possibly custom) JSON Schema dialects.-
Method Summary
Modifier and TypeMethodDescriptionDefault $vocabulary keyword contents for this dialect.Core evaluator factory used by this dialect.Meta-schema URI against which all schemas will be validated, unless there is a $schema keyword present.All vocabulary URIs that are considered required at all times.Specification version used by this dialect.All vocabulary URIs that are supported by this dialect.
-
Method Details
-
getSpecificationVersion
SpecificationVersion getSpecificationVersion()Specification version used by this dialect. Different versions are basically a modes in which validator can run in.- Returns:
- specification version
-
getMetaSchema
String getMetaSchema()Meta-schema URI against which all schemas will be validated, unless there is a $schema keyword present.- Returns:
- meta-schema URI
-
getEvaluatorFactory
EvaluatorFactory getEvaluatorFactory()Core evaluator factory used by this dialect.- Returns:
- evaluator factory
-
getSupportedVocabularies
All vocabulary URIs that are supported by this dialect. Actual implementation for vocabularies and keywords should be provided bygetEvaluatorFactory()- Returns:
- set of supported vocabularies
-
getRequiredVocabularies
All vocabulary URIs that are considered required at all times. If $vocabulary keyword does not include this vocabulary or sets it as optional,VocabularyExceptionwill be thrown.- Returns:
- set of required vocabularies
-
getDefaultVocabularyObject
Default $vocabulary keyword contents for this dialect. If meta-schema does not include $vocabulary keyword this default will be used.- Returns:
- default vocabulary object
-