Record Class ConfigurationSchema

java.lang.Object
java.lang.Record
io.micronaut.jsonschema.configuration.validator.model.ConfigurationSchema
Record Components:
schema - The schema dialect URI, mapped from $schema
id - The schema identifier, mapped from $id
title - Optional human-readable title
type - The JSON Schema type (string or array)
description - Optional schema description
micronaut - Micronaut-specific metadata, mapped from x-micronaut
format - Optional string format
pattern - Optional regex pattern for strings
minLength - Minimum length for string values
maxLength - Maximum length for string values
minItems - Minimum number of items for array values
maxItems - Maximum number of items for array values
uniqueItems - Whether array items must be unique
multipleOf - Numeric multiple-of constraint
constValue - Constant value constraint
properties - Object properties mapped from properties
required - Required property names mapped from required
minProperties - Minimum number of properties for object values
maxProperties - Maximum number of properties for object values
enumValues - Allowed values mapped from enum
minimum - Minimum numeric value
exclusiveMinimum - Exclusive minimum numeric value
maximum - Maximum numeric value
exclusiveMaximum - Exclusive maximum numeric value
items - Schema for array items
additionalProperties - Schema for additional properties (boolean or object)
defs - Local schema definitions mapped from $defs
ref - Reference to another schema mapped from $ref

@Internal public record ConfigurationSchema(@Nullable URI schema, @Nullable String id, @Nullable String title, @Nullable Object type, @Nullable String description, @Nullable MicronautMetadata micronaut, @Nullable String format, @Nullable String pattern, @Nullable Integer minLength, @Nullable Integer maxLength, @Nullable Integer minItems, @Nullable Integer maxItems, @Nullable Boolean uniqueItems, @Nullable BigDecimal multipleOf, @Nullable Object constValue, @Nullable Map<String, ConfigurationSchemaProperty> properties, @Nullable List<String> required, @Nullable Integer minProperties, @Nullable Integer maxProperties, @Nullable List<Object> enumValues, @Nullable BigDecimal minimum, @Nullable BigDecimal exclusiveMinimum, @Nullable BigDecimal maximum, @Nullable BigDecimal exclusiveMaximum, @Nullable ConfigurationSchemaProperty items, @Nullable Object additionalProperties, @Nullable Map<String, ConfigurationSchemaProperty> defs, @Nullable String ref) extends Record
Root configuration schema model used by the configuration validator.

This record is intentionally permissive and maps only the subset of JSON Schema keywords that are needed by the validator and commonly present in Micronaut configuration schemas.

Note: Some JSON Schema keywords (for example type and additionalProperties) may appear in multiple shapes (string vs array, boolean vs object). Those fields are modeled as Object and normalized by validator helpers.

  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • schema

      public @Nullable URI schema()
      Returns the value of the schema record component.
      Returns:
      the value of the schema record component
    • id

      public @Nullable String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • title

      public @Nullable String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • type

      public @Nullable Object type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • description

      public @Nullable String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • micronaut

      public @Nullable MicronautMetadata micronaut()
      Returns the value of the micronaut record component.
      Returns:
      the value of the micronaut record component
    • format

      public @Nullable String format()
      Returns the value of the format record component.
      Returns:
      the value of the format record component
    • pattern

      public @Nullable String pattern()
      Returns the value of the pattern record component.
      Returns:
      the value of the pattern record component
    • minLength

      public @Nullable Integer minLength()
      Returns the value of the minLength record component.
      Returns:
      the value of the minLength record component
    • maxLength

      public @Nullable Integer maxLength()
      Returns the value of the maxLength record component.
      Returns:
      the value of the maxLength record component
    • minItems

      public @Nullable Integer minItems()
      Returns the value of the minItems record component.
      Returns:
      the value of the minItems record component
    • maxItems

      public @Nullable Integer maxItems()
      Returns the value of the maxItems record component.
      Returns:
      the value of the maxItems record component
    • uniqueItems

      public @Nullable Boolean uniqueItems()
      Returns the value of the uniqueItems record component.
      Returns:
      the value of the uniqueItems record component
    • multipleOf

      public @Nullable BigDecimal multipleOf()
      Returns the value of the multipleOf record component.
      Returns:
      the value of the multipleOf record component
    • constValue

      public @Nullable Object constValue()
      Returns the value of the constValue record component.
      Returns:
      the value of the constValue record component
    • properties

      public @Nullable Map<String, ConfigurationSchemaProperty> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • required

      public @Nullable List<String> required()
      Returns the value of the required record component.
      Returns:
      the value of the required record component
    • minProperties

      public @Nullable Integer minProperties()
      Returns the value of the minProperties record component.
      Returns:
      the value of the minProperties record component
    • maxProperties

      public @Nullable Integer maxProperties()
      Returns the value of the maxProperties record component.
      Returns:
      the value of the maxProperties record component
    • enumValues

      public @Nullable List<Object> enumValues()
      Returns the value of the enumValues record component.
      Returns:
      the value of the enumValues record component
    • minimum

      public @Nullable BigDecimal minimum()
      Returns the value of the minimum record component.
      Returns:
      the value of the minimum record component
    • exclusiveMinimum

      public @Nullable BigDecimal exclusiveMinimum()
      Returns the value of the exclusiveMinimum record component.
      Returns:
      the value of the exclusiveMinimum record component
    • maximum

      public @Nullable BigDecimal maximum()
      Returns the value of the maximum record component.
      Returns:
      the value of the maximum record component
    • exclusiveMaximum

      public @Nullable BigDecimal exclusiveMaximum()
      Returns the value of the exclusiveMaximum record component.
      Returns:
      the value of the exclusiveMaximum record component
    • items

      public @Nullable ConfigurationSchemaProperty items()
      Returns the value of the items record component.
      Returns:
      the value of the items record component
    • additionalProperties

      public @Nullable Object additionalProperties()
      Returns the value of the additionalProperties record component.
      Returns:
      the value of the additionalProperties record component
    • defs

      public @Nullable Map<String, ConfigurationSchemaProperty> defs()
      Returns the value of the defs record component.
      Returns:
      the value of the defs record component
    • ref

      public @Nullable String ref()
      Returns the value of the ref record component.
      Returns:
      the value of the ref record component