Class Schema
java.lang.Object
io.micronaut.jsonschema.visitor.model.Schema
A JSON schema.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The type of schema exactly matching a primitive JSON type. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddRequired
(String requiredProperty) addType
(Schema.Type type) static Schema
array()
static Schema
bool()
get$id()
get$ref()
getItems()
getNot()
getOneOf()
io.micronaut.inject.ast.TypedElement
getTitle()
getType()
static Schema
integer()
static Schema
number()
static Schema
object()
putProperty
(String name, Schema property) static Schema
set$schema
(String $schema) setAdditionalProperties
(Schema additionalProperties) setConstValue
(Object constValue) setContains
(List<Object> contains) setDefaultValue
(Object defaultValue) setDeprecated
(boolean deprecated) setDescription
(String description) setEnumValues
(List<Object> enumValues) setExamples
(List<Object> examples) setExclusiveMaximum
(Object exclusiveMaximum) setExclusiveMinimum
(Object exclusiveMinimum) setMaxContains
(Integer maxContains) setMaximum
(Object maximum) setMaxItems
(Integer maxItems) setMaxLength
(Integer maxLength) setMinContains
(Integer minContains) setMinimum
(Object minimum) setMinItems
(Integer minItems) setMinLength
(Integer minLength) setMultipleOf
(Object multipleOf) setPattern
(String pattern) setProperties
(Map<String, Schema> properties) setReadOnly
(boolean readOnly) setRequired
(List<String> required) setSourceElement
(io.micronaut.inject.ast.TypedElement sourceElement) setType
(List<Schema.Type> type) setUniqueItems
(boolean uniqueItems) setWriteOnly
(boolean writeOnly) static Schema
string()
-
Field Details
-
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
A false schema is a schema that would be invalid for any instance. This is also equivalent to not true. -
THIS_SCHEMA_REF
- See Also:
-
DEF_SCHEMA_REF_PREFIX
- See Also:
-
-
Constructor Details
-
Schema
public Schema()
-
-
Method Details
-
getTitle
-
setTitle
-
getDescription
-
setDescription
-
getType
-
setType
-
addType
-
getFormat
-
setFormat
-
getConstValue
-
setConstValue
-
getEnumValues
-
setEnumValues
-
getItems
-
setItems
-
getProperties
-
setProperties
-
putProperty
-
getDefaultValue
-
setDefaultValue
-
isDeprecated
-
setDeprecated
-
isReadOnly
-
setReadOnly
-
isWriteOnly
-
setWriteOnly
-
getExamples
-
setExamples
-
getMultipleOf
-
setMultipleOf
-
getMaximum
-
setMaximum
-
getMinimum
-
setMinimum
-
getExclusiveMaximum
-
setExclusiveMaximum
-
getExclusiveMinimum
-
setExclusiveMinimum
-
getMaxLength
-
setMaxLength
-
getMinLength
-
setMinLength
-
getPattern
-
setPattern
-
getMaxItems
-
setMaxItems
-
getMinItems
-
setMinItems
-
isUniqueItems
-
setUniqueItems
-
getMaxContains
-
setMaxContains
-
getMinContains
-
setMinContains
-
getContains
-
setContains
-
getRequired
-
setRequired
-
addRequired
-
getAdditionalProperties
-
setAdditionalProperties
-
getOneOf
-
setOneOf
-
addOneOf
-
get$schema
-
set$schema
-
get$id
-
set$id
-
get$ref
-
set$ref
-
string
-
number
-
integer
-
object
-
array
-
bool
-
reference
-
getNot
-
setNot
-
getSourceElement
public io.micronaut.inject.ast.TypedElement getSourceElement() -
setSourceElement
-