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$schemaid- The schema identifier, mapped from$idtitle- Optional human-readable titletype- The JSON Schema type (string or array)description- Optional schema descriptionmicronaut- Micronaut-specific metadata, mapped fromx-micronautformat- Optional string formatpattern- Optional regex pattern for stringsminLength- Minimum length for string valuesmaxLength- Maximum length for string valuesminItems- Minimum number of items for array valuesmaxItems- Maximum number of items for array valuesuniqueItems- Whether array items must be uniquemultipleOf- Numeric multiple-of constraintconstValue- Constant value constraintproperties- Object properties mapped frompropertiesrequired- Required property names mapped fromrequiredminProperties- Minimum number of properties for object valuesmaxProperties- Maximum number of properties for object valuesenumValues- Allowed values mapped fromenumminimum- Minimum numeric valueexclusiveMinimum- Exclusive minimum numeric valuemaximum- Maximum numeric valueexclusiveMaximum- Exclusive maximum numeric valueitems- Schema for array itemsadditionalProperties- Schema for additional properties (boolean or object)defs- Local schema definitions mapped from$defsref- 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 Summary
ConstructorsConstructorDescriptionConfigurationSchema(@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) Creates an instance of aConfigurationSchemarecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable ObjectReturns the value of theadditionalPropertiesrecord component.@Nullable ObjectReturns the value of theconstValuerecord component.@Nullable Map<String, ConfigurationSchemaProperty> defs()Returns the value of thedefsrecord component.@Nullable StringReturns the value of thedescriptionrecord component.Returns the value of theenumValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable BigDecimalReturns the value of theexclusiveMaximumrecord component.@Nullable BigDecimalReturns the value of theexclusiveMinimumrecord component.@Nullable Stringformat()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.@Nullable Stringid()Returns the value of theidrecord component.@Nullable ConfigurationSchemaPropertyitems()Returns the value of theitemsrecord component.@Nullable BigDecimalmaximum()Returns the value of themaximumrecord component.@Nullable IntegermaxItems()Returns the value of themaxItemsrecord component.@Nullable IntegerReturns the value of themaxLengthrecord component.@Nullable IntegerReturns the value of themaxPropertiesrecord component.@Nullable MicronautMetadataReturns the value of themicronautrecord component.@Nullable BigDecimalminimum()Returns the value of theminimumrecord component.@Nullable IntegerminItems()Returns the value of theminItemsrecord component.@Nullable IntegerReturns the value of theminLengthrecord component.@Nullable IntegerReturns the value of theminPropertiesrecord component.@Nullable BigDecimalReturns the value of themultipleOfrecord component.@Nullable Stringpattern()Returns the value of thepatternrecord component.@Nullable Map<String, ConfigurationSchemaProperty> Returns the value of thepropertiesrecord component.@Nullable Stringref()Returns the value of therefrecord component.required()Returns the value of therequiredrecord component.@Nullable URIschema()Returns the value of theschemarecord component.@Nullable Stringtitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.@Nullable Objecttype()Returns the value of thetyperecord component.@Nullable BooleanReturns the value of theuniqueItemsrecord component.
-
Constructor Details
-
ConfigurationSchema
public 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) Creates an instance of aConfigurationSchemarecord class.- Parameters:
schema- the value for theschemarecord componentid- the value for theidrecord componenttitle- the value for thetitlerecord componenttype- the value for thetyperecord componentdescription- the value for thedescriptionrecord componentmicronaut- the value for themicronautrecord componentformat- the value for theformatrecord componentpattern- the value for thepatternrecord componentminLength- the value for theminLengthrecord componentmaxLength- the value for themaxLengthrecord componentminItems- the value for theminItemsrecord componentmaxItems- the value for themaxItemsrecord componentuniqueItems- the value for theuniqueItemsrecord componentmultipleOf- the value for themultipleOfrecord componentconstValue- the value for theconstValuerecord componentproperties- the value for thepropertiesrecord componentrequired- the value for therequiredrecord componentminProperties- the value for theminPropertiesrecord componentmaxProperties- the value for themaxPropertiesrecord componentenumValues- the value for theenumValuesrecord componentminimum- the value for theminimumrecord componentexclusiveMinimum- the value for theexclusiveMinimumrecord componentmaximum- the value for themaximumrecord componentexclusiveMaximum- the value for theexclusiveMaximumrecord componentitems- the value for theitemsrecord componentadditionalProperties- the value for theadditionalPropertiesrecord componentdefs- the value for thedefsrecord componentref- the value for therefrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
schema
-
id
-
title
-
type
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
micronaut
-
format
-
pattern
-
minLength
-
maxLength
-
minItems
-
maxItems
-
uniqueItems
Returns the value of theuniqueItemsrecord component.- Returns:
- the value of the
uniqueItemsrecord component
-
multipleOf
Returns the value of themultipleOfrecord component.- Returns:
- the value of the
multipleOfrecord component
-
constValue
Returns the value of theconstValuerecord component.- Returns:
- the value of the
constValuerecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
required
-
minProperties
Returns the value of theminPropertiesrecord component.- Returns:
- the value of the
minPropertiesrecord component
-
maxProperties
Returns the value of themaxPropertiesrecord component.- Returns:
- the value of the
maxPropertiesrecord component
-
enumValues
Returns the value of theenumValuesrecord component.- Returns:
- the value of the
enumValuesrecord component
-
minimum
-
exclusiveMinimum
Returns the value of theexclusiveMinimumrecord component.- Returns:
- the value of the
exclusiveMinimumrecord component
-
maximum
-
exclusiveMaximum
Returns the value of theexclusiveMaximumrecord component.- Returns:
- the value of the
exclusiveMaximumrecord component
-
items
-
additionalProperties
Returns the value of theadditionalPropertiesrecord component.- Returns:
- the value of the
additionalPropertiesrecord component
-
defs
-
ref
-