java.lang.Object
java.lang.Record
com.arc_e_tect.gradle.apionly.transcriberj.model.Schema
Record Components:
literal - true or false for a boolean schema, otherwise null
ref - the name of the schema component $ref points at, or null
types - type, as a list even when written as a single string, or null
typeWrittenAsList - whether type was written as a list
format - format, or null
description - description, or null
constValue - const, or null when absent
enumValues - enum, or null
required - required, or null
properties - properties in declaration order, or null
patternProperties - patternProperties in declaration order, or null
items - items, or null
additionalProperties - additionalProperties, or null
allOf - allOf, or null
oneOf - oneOf, or null
anyOf - anyOf, or null
discriminator - discriminator, or null
constraints - the validation keywords; never null
annotations - keywords that describe rather than constrain -- title, examples, default, x- extensions and the like -- as parsed, in declaration order
unmodelled - every other keyword, as parsed; each is also a Finding

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 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • literal

      public Boolean literal()
      Returns the value of the literal record component.
      Returns:
      the value of the literal record component
    • ref

      public String ref()
      Returns the value of the ref record component.
      Returns:
      the value of the ref record component
    • types

      public List<String> types()
      Returns the value of the types record component.
      Returns:
      the value of the types record component
    • typeWrittenAsList

      public boolean typeWrittenAsList()
      Returns the value of the typeWrittenAsList record component.
      Returns:
      the value of the typeWrittenAsList record component
    • format

      public String format()
      Returns the value of the format record component.
      Returns:
      the value of the format record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • constValue

      public Const constValue()
      Returns the value of the constValue record component.
      Returns:
      the value of the constValue record component
    • enumValues

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

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

      public Map<String,Schema> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • patternProperties

      public Map<String,Schema> patternProperties()
      Returns the value of the patternProperties record component.
      Returns:
      the value of the patternProperties record component
    • items

      public Schema items()
      Returns the value of the items record component.
      Returns:
      the value of the items record component
    • additionalProperties

      public AdditionalProperties additionalProperties()
      Returns the value of the additionalProperties record component.
      Returns:
      the value of the additionalProperties record component
    • allOf

      public List<Schema> allOf()
      Returns the value of the allOf record component.
      Returns:
      the value of the allOf record component
    • oneOf

      public List<Schema> oneOf()
      Returns the value of the oneOf record component.
      Returns:
      the value of the oneOf record component
    • anyOf

      public List<Schema> anyOf()
      Returns the value of the anyOf record component.
      Returns:
      the value of the anyOf record component
    • discriminator

      public Discriminator discriminator()
      Returns the value of the discriminator record component.
      Returns:
      the value of the discriminator record component
    • constraints

      public Constraints constraints()
      Returns the value of the constraints record component.
      Returns:
      the value of the constraints record component
    • annotations

      public Map<String,Object> annotations()
      Returns the value of the annotations record component.
      Returns:
      the value of the annotations record component
    • unmodelled

      public Map<String,Object> unmodelled()
      Returns the value of the unmodelled record component.
      Returns:
      the value of the unmodelled record component