Enum Class Dialect

java.lang.Object
java.lang.Enum<Dialect>
io.micronaut.jsonschema.validation.engine.Dialect
All Implemented Interfaces:
Serializable, Comparable<Dialect>, Constable

@Internal public enum Dialect extends Enum<Dialect>
The JSON Schema dialects (specification drafts) supported by the engine.
Since:
2.3.2
Author:
Graeme Rocher
  • Enum Constant Details

    • DRAFT_4

      public static final Dialect DRAFT_4
      JSON Schema draft-04.
    • DRAFT_6

      public static final Dialect DRAFT_6
      JSON Schema draft-06.
    • DRAFT_7

      public static final Dialect DRAFT_7
      JSON Schema draft-07.
    • DRAFT_2019_09

      public static final Dialect DRAFT_2019_09
      JSON Schema 2019-09.
    • DRAFT_2020_12

      public static final Dialect DRAFT_2020_12
      JSON Schema 2020-12.
  • Method Details

    • values

      public static Dialect[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Dialect valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getMetaSchemaUri

      public String getMetaSchemaUri()
      Returns the meta-schema URI.
      Returns:
      The URI of the dialect's meta-schema
    • fromMetaSchemaUri

      public static @Nullable Dialect fromMetaSchemaUri(String uri)
      Resolves a dialect from the value of a $schema keyword.
      Parameters:
      uri - The meta-schema URI
      Returns:
      The dialect or null if the URI is not a known meta-schema