java.lang.Object
io.micronaut.jsonschema.visitor.model.Schema

@Internal public final class Schema extends Object
A JSON schema.
  • Field Details

    • TRUE

      public static final Schema TRUE
      A true schema is a schema that would be valid for any instance. This is also equivalent to just an empty schema, as it has no restrictions then.
    • FALSE

      public static final Schema FALSE
      A false schema is a schema that would be invalid for any instance. This is also equivalent to not true.
    • THIS_SCHEMA_REF

      public static final String THIS_SCHEMA_REF
      See Also:
    • DEF_SCHEMA_REF_PREFIX

      public static final String DEF_SCHEMA_REF_PREFIX
      See Also:
  • Constructor Details

    • Schema

      public Schema()
  • Method Details

    • getTitle

      public String getTitle()
    • setTitle

      public Schema setTitle(String title)
    • getDescription

      public String getDescription()
    • setDescription

      public Schema setDescription(String description)
    • getType

      public List<Schema.Type> getType()
    • setType

      public Schema setType(List<Schema.Type> type)
    • addType

      public Schema addType(Schema.Type type)
    • getFormat

      public String getFormat()
    • setFormat

      public Schema setFormat(String format)
    • getConstValue

      public Object getConstValue()
    • setConstValue

      public Schema setConstValue(Object constValue)
    • getEnumValues

      public List<Object> getEnumValues()
    • setEnumValues

      public Schema setEnumValues(List<Object> enumValues)
    • getItems

      public Schema getItems()
    • setItems

      public Schema setItems(Schema items)
    • getProperties

      public Map<String,Schema> getProperties()
    • setProperties

      public Schema setProperties(Map<String,Schema> properties)
    • putProperty

      public Schema putProperty(String name, Schema property)
    • getDefaultValue

      public Object getDefaultValue()
    • setDefaultValue

      public Schema setDefaultValue(Object defaultValue)
    • isDeprecated

      public Boolean isDeprecated()
    • setDeprecated

      public Schema setDeprecated(boolean deprecated)
    • isReadOnly

      public Boolean isReadOnly()
    • setReadOnly

      public Schema setReadOnly(boolean readOnly)
    • isWriteOnly

      public Boolean isWriteOnly()
    • setWriteOnly

      public Schema setWriteOnly(boolean writeOnly)
    • getExamples

      public List<Object> getExamples()
    • setExamples

      public Schema setExamples(List<Object> examples)
    • getMultipleOf

      public Object getMultipleOf()
    • setMultipleOf

      public Schema setMultipleOf(Object multipleOf)
    • getMaximum

      public Object getMaximum()
    • setMaximum

      public Schema setMaximum(Object maximum)
    • getMinimum

      public Object getMinimum()
    • setMinimum

      public Schema setMinimum(Object minimum)
    • getExclusiveMaximum

      public Object getExclusiveMaximum()
    • setExclusiveMaximum

      public Schema setExclusiveMaximum(Object exclusiveMaximum)
    • getExclusiveMinimum

      public Object getExclusiveMinimum()
    • setExclusiveMinimum

      public Schema setExclusiveMinimum(Object exclusiveMinimum)
    • getMaxLength

      public Integer getMaxLength()
    • setMaxLength

      public Schema setMaxLength(Integer maxLength)
    • getMinLength

      public Integer getMinLength()
    • setMinLength

      public Schema setMinLength(Integer minLength)
    • getPattern

      public String getPattern()
    • setPattern

      public Schema setPattern(String pattern)
    • getMaxItems

      public Integer getMaxItems()
    • setMaxItems

      public Schema setMaxItems(Integer maxItems)
    • getMinItems

      public Integer getMinItems()
    • setMinItems

      public Schema setMinItems(Integer minItems)
    • isUniqueItems

      public Boolean isUniqueItems()
    • setUniqueItems

      public Schema setUniqueItems(boolean uniqueItems)
    • getMaxContains

      public Integer getMaxContains()
    • setMaxContains

      public Schema setMaxContains(Integer maxContains)
    • getMinContains

      public Integer getMinContains()
    • setMinContains

      public Schema setMinContains(Integer minContains)
    • getContains

      public List<Object> getContains()
    • setContains

      public Schema setContains(List<Object> contains)
    • getRequired

      public List<String> getRequired()
    • setRequired

      public Schema setRequired(List<String> required)
    • addRequired

      public Schema addRequired(String requiredProperty)
    • getAdditionalProperties

      public Schema getAdditionalProperties()
    • setAdditionalProperties

      public Schema setAdditionalProperties(Schema additionalProperties)
    • getOneOf

      public List<Schema> getOneOf()
    • setOneOf

      public Schema setOneOf(List<Schema> oneOf)
    • addOneOf

      public Schema addOneOf(Schema one)
    • get$schema

      public String get$schema()
    • set$schema

      public Schema set$schema(String $schema)
    • get$id

      public String get$id()
    • set$id

      public Schema set$id(String $id)
    • get$ref

      public String get$ref()
    • set$ref

      public Schema set$ref(String $ref)
    • string

      public static Schema string()
    • number

      public static Schema number()
    • integer

      public static Schema integer()
    • object

      public static Schema object()
    • array

      public static Schema array()
    • bool

      public static Schema bool()
    • reference

      public static Schema reference(String id)
    • getNot

      public Schema getNot()
    • setNot

      public Schema setNot(Schema not)
    • getSourceElement

      public io.micronaut.inject.ast.TypedElement getSourceElement()
    • setSourceElement

      public Schema setSourceElement(io.micronaut.inject.ast.TypedElement sourceElement)