Record Class Schema
java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.apionly.transcriberj.model.Schema
- Record Components:
literal-trueorfalsefor a boolean schema, otherwisenullref- the name of the schema component$refpoints at, ornulltypes-type, as a list even when written as a single string, ornulltypeWrittenAsList- whethertypewas written as a listformat-format, ornulldescription-description, ornullconstValue-const, ornullwhen absentenumValues-enum, ornullrequired-required, ornullproperties-propertiesin declaration order, ornullpatternProperties-patternPropertiesin declaration order, ornullitems-items, ornulladditionalProperties-additionalProperties, ornullallOf-allOf, ornulloneOf-oneOf, ornullanyOf-anyOf, ornulldiscriminator-discriminator, ornullconstraints- the validation keywords; nevernullannotations- keywords that describe rather than constrain --title,examples,default,x-extensions and the like -- as parsed, in declaration orderunmodelled- every other keyword, as parsed; each is also aFinding
public record Schema(Boolean literal, String ref, List<String> types, boolean typeWrittenAsList, String format, String description, Const constValue, List<Object> enumValues, List<String> required, Map<String,Schema> properties, Map<String,Schema> patternProperties, Schema items, AdditionalProperties additionalProperties, List<Schema> allOf, List<Schema> oneOf, List<Schema> anyOf, Discriminator discriminator, Constraints constraints, Map<String,Object> annotations, Map<String,Object> unmodelled)
extends Record
A JSON Schema, as a bundled contract writes it.
A schema written as the literal true or false has that
literal and nothing else.
-
Constructor Summary
ConstructorsConstructorDescriptionSchema(Boolean literal, String ref, List<String> types, boolean typeWrittenAsList, String format, String description, Const constValue, List<Object> enumValues, List<String> required, Map<String, Schema> properties, Map<String, Schema> patternProperties, Schema items, AdditionalProperties additionalProperties, List<Schema> allOf, List<Schema> oneOf, List<Schema> anyOf, Discriminator discriminator, Constraints constraints, Map<String, Object> annotations, Map<String, Object> unmodelled) Creates an instance of aSchemarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadditionalPropertiesrecord component.allOf()Returns the value of theallOfrecord component.Returns the value of theannotationsrecord component.anyOf()Returns the value of theanyOfrecord component.Returns the value of theconstraintsrecord component.Returns the value of theconstValuerecord component.Returns the value of thedescriptionrecord component.Returns the value of thediscriminatorrecord component.Returns the value of theenumValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.format()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.items()Returns the value of theitemsrecord component.literal()Returns the value of theliteralrecord component.oneOf()Returns the value of theoneOfrecord component.Returns the value of thepatternPropertiesrecord component.Returns the value of thepropertiesrecord component.ref()Returns the value of therefrecord component.required()Returns the value of therequiredrecord component.final StringtoString()Returns a string representation of this record class.types()Returns the value of thetypesrecord component.booleanReturns the value of thetypeWrittenAsListrecord component.Returns the value of theunmodelledrecord component.
-
Constructor Details
-
Schema
public Schema(Boolean literal, String ref, List<String> types, boolean typeWrittenAsList, String format, String description, Const constValue, List<Object> enumValues, List<String> required, Map<String, Schema> properties, Map<String, Schema> patternProperties, Schema items, AdditionalProperties additionalProperties, List<Schema> allOf, List<Schema> oneOf, List<Schema> anyOf, Discriminator discriminator, Constraints constraints, Map<String, Object> annotations, Map<String, Object> unmodelled) Creates an instance of aSchemarecord class.- Parameters:
literal- the value for theliteralrecord componentref- the value for therefrecord componenttypes- the value for thetypesrecord componenttypeWrittenAsList- the value for thetypeWrittenAsListrecord componentformat- the value for theformatrecord componentdescription- the value for thedescriptionrecord componentconstValue- the value for theconstValuerecord componentenumValues- the value for theenumValuesrecord componentrequired- the value for therequiredrecord componentproperties- the value for thepropertiesrecord componentpatternProperties- the value for thepatternPropertiesrecord componentitems- the value for theitemsrecord componentadditionalProperties- the value for theadditionalPropertiesrecord componentallOf- the value for theallOfrecord componentoneOf- the value for theoneOfrecord componentanyOf- the value for theanyOfrecord componentdiscriminator- the value for thediscriminatorrecord componentconstraints- the value for theconstraintsrecord componentannotations- the value for theannotationsrecord componentunmodelled- the value for theunmodelledrecord component
-
-
Method Details
-
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. -
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
literal
Returns the value of theliteralrecord component.- Returns:
- the value of the
literalrecord component
-
ref
Returns the value of therefrecord component.- Returns:
- the value of the
refrecord component
-
types
Returns the value of thetypesrecord component.- Returns:
- the value of the
typesrecord component
-
typeWrittenAsList
public boolean typeWrittenAsList()Returns the value of thetypeWrittenAsListrecord component.- Returns:
- the value of the
typeWrittenAsListrecord component
-
format
Returns the value of theformatrecord component.- Returns:
- the value of the
formatrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
constValue
Returns the value of theconstValuerecord component.- Returns:
- the value of the
constValuerecord component
-
enumValues
Returns the value of theenumValuesrecord component.- Returns:
- the value of the
enumValuesrecord component
-
required
Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
patternProperties
Returns the value of thepatternPropertiesrecord component.- Returns:
- the value of the
patternPropertiesrecord component
-
items
Returns the value of theitemsrecord component.- Returns:
- the value of the
itemsrecord component
-
additionalProperties
Returns the value of theadditionalPropertiesrecord component.- Returns:
- the value of the
additionalPropertiesrecord component
-
allOf
Returns the value of theallOfrecord component.- Returns:
- the value of the
allOfrecord component
-
oneOf
Returns the value of theoneOfrecord component.- Returns:
- the value of the
oneOfrecord component
-
anyOf
Returns the value of theanyOfrecord component.- Returns:
- the value of the
anyOfrecord component
-
discriminator
Returns the value of thediscriminatorrecord component.- Returns:
- the value of the
discriminatorrecord component
-
constraints
Returns the value of theconstraintsrecord component.- Returns:
- the value of the
constraintsrecord component
-
annotations
Returns the value of theannotationsrecord component.- Returns:
- the value of the
annotationsrecord component
-
unmodelled
Returns the value of theunmodelledrecord component.- Returns:
- the value of the
unmodelledrecord component
-