Interface Dialect

All Known Implementing Classes:
Dialects.Draft2020Dialect

public interface Dialect
Dialect interface is the main abstraction for a specific (possibly custom) JSON Schema dialects.
  • 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

      Set<String> getSupportedVocabularies()
      All vocabulary URIs that are supported by this dialect. Actual implementation for vocabularies and keywords should be provided by getEvaluatorFactory()
      Returns:
      set of supported vocabularies
    • getRequiredVocabularies

      Set<String> getRequiredVocabularies()
      All vocabulary URIs that are considered required at all times. If $vocabulary keyword does not include this vocabulary or sets it as optional, VocabularyException will be thrown.
      Returns:
      set of required vocabularies
    • getDefaultVocabularyObject

      Map<String,Boolean> 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