@Bean(properties="format,title,description,default,multipleOf,maximum,exclusiveMaximum,minimum,exclusiveMinimum,maxLength,minLength,pattern,maxItems,minItems,uniqueItems,maxProperties,minProperties,required,enum,type,items,allOf,properties,additionalProperties,discriminator,readOnly,xml,externalDocs,example,*") public class SchemaInfo extends SwaggerElement
These types can be objects, but also primitives and arrays. This object is based on the JSON Schema Specification Draft 4 and uses a predefined subset of it. On top of this subset, there are extensions provided by this specification to allow for more complete documentation.
Further information about the properties can be found in JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema specification as referenced here.
Constructor and Description |
---|
SchemaInfo() |
Modifier and Type | Method and Description |
---|---|
SchemaInfo |
_default(Object value)
Same as
setDefault(Object) . |
SchemaInfo |
_enum(Object... values)
Adds one or more values to the
|
SchemaInfo |
addAdditionalProperties(Map<String,Object> values)
Adds one or more values to the
|
SchemaInfo |
addAllOf(Collection<Object> values)
Adds one or more values to the
|
SchemaInfo |
addEnum(Collection<Object> value)
Adds one or more values to the
|
SchemaInfo |
additionalProperties(Object... values)
Adds one or more values to the
|
SchemaInfo |
additionalProperty(String name,
Object value)
Adds a single value to the
|
SchemaInfo |
addProperties(Map<String,Map<String,Object>> values)
Adds one or more values to the
|
SchemaInfo |
allOf(Object... values)
Adds one or more values to the
|
SchemaInfo |
description(Object value)
Same as
setDescription(String) . |
SchemaInfo |
discriminator(Object value)
Same as
setDiscriminator(String) . |
SchemaInfo |
example(Object value)
Same as
setExample(Object) . |
SchemaInfo |
exclusiveMaximum(Object value)
Same as
setExclusiveMaximum(Boolean) . |
SchemaInfo |
exclusiveMinimum(Object value)
Same as
setExclusiveMinimum(Boolean) . |
SchemaInfo |
externalDocs(Object value)
|
SchemaInfo |
format(Object value)
Same as
setFormat(String) . |
<T> T |
get(String property,
Class<T> type)
Generic property getter.
|
Map<String,Object> |
getAdditionalProperties()
Bean property getter:
|
List<Object> |
getAllOf()
Bean property getter:
|
Object |
getDefault()
Bean property getter:
|
String |
getDescription()
Bean property getter:
|
String |
getDiscriminator()
Bean property getter:
|
List<Object> |
getEnum()
Bean property getter:
|
Object |
getExample()
Bean property getter:
|
Boolean |
getExclusiveMaximum()
Bean property getter:
|
Boolean |
getExclusiveMinimum()
Bean property getter:
|
ExternalDocumentation |
getExternalDocs()
Bean property getter:
|
String |
getFormat()
Bean property getter:
|
Items |
getItems()
Bean property getter:
|
Number |
getMaximum()
Bean property getter:
|
Integer |
getMaxItems()
Bean property getter:
|
Integer |
getMaxLength()
Bean property getter:
|
Integer |
getMaxProperties()
Bean property getter:
|
Number |
getMinimum()
Bean property getter:
|
Integer |
getMinItems()
Bean property getter:
|
Integer |
getMinLength()
Bean property getter:
|
Integer |
getMinProperties()
Bean property getter:
|
Number |
getMultipleOf()
Bean property getter:
|
String |
getPattern()
Bean property getter:
|
Map<String,Map<String,Object>> |
getProperties()
Bean property getter:
|
Boolean |
getReadOnly()
Bean property getter:
|
Boolean |
getRequired()
Bean property getter:
|
String |
getTitle()
Bean property getter:
|
String |
getType()
Bean property getter:
|
Boolean |
getUniqueItems()
Bean property getter:
|
Xml |
getXml()
Bean property getter:
|
SchemaInfo |
items(Object value)
Same as
setItems(Items) . |
SchemaInfo |
maximum(Object value)
Same as
setMaximum(Number) . |
SchemaInfo |
maxItems(Object value)
Same as
setMaxItems(Integer) . |
SchemaInfo |
maxLength(Object value)
Same as
setMaxLength(Integer) . |
SchemaInfo |
maxProperties(Object value)
Same as
setMaxProperties(Integer) . |
SchemaInfo |
minimum(Object value)
Same as
setMinimum(Number) . |
SchemaInfo |
minItems(Object value)
Same as
setMinItems(Integer) . |
SchemaInfo |
minLength(Object value)
Same as
setMinLength(Integer) . |
SchemaInfo |
minProperties(Object value)
Same as
setMinProperties(Integer) . |
SchemaInfo |
multipleOf(Object value)
Same as
setMultipleOf(Number) . |
SchemaInfo |
pattern(Object value)
Same as
setPattern(String) . |
SchemaInfo |
properties(Object... values)
Adds one or more values to the
|
SchemaInfo |
readOnly(Object value)
Same as
setReadOnly(Boolean) . |
SchemaInfo |
required(Object value)
Same as
setRequired(Boolean) . |
SchemaInfo |
set(String property,
Object value)
Generic property setter.
|
SchemaInfo |
setAdditionalProperties(Map<String,Object> value)
Bean property setter:
|
SchemaInfo |
setAllOf(Collection<Object> value)
Bean property setter:
|
SchemaInfo |
setDefault(Object value)
Bean property setter:
|
SchemaInfo |
setDescription(String value)
Bean property setter:
|
SchemaInfo |
setDiscriminator(String value)
Bean property setter:
|
SchemaInfo |
setEnum(Collection<Object> value)
Bean property setter:
|
SchemaInfo |
setExample(Object value)
Bean property setter:
|
SchemaInfo |
setExclusiveMaximum(Boolean value)
Bean property setter:
|
SchemaInfo |
setExclusiveMinimum(Boolean value)
Bean property setter:
|
SchemaInfo |
setExternalDocs(ExternalDocumentation value)
Bean property setter:
|
SchemaInfo |
setFormat(String value)
Bean property setter:
|
SchemaInfo |
setItems(Items value)
Bean property setter:
|
SchemaInfo |
setMaximum(Number value)
Bean property setter:
|
SchemaInfo |
setMaxItems(Integer value)
Bean property setter:
|
SchemaInfo |
setMaxLength(Integer value)
Bean property setter:
|
SchemaInfo |
setMaxProperties(Integer value)
Bean property setter:
|
SchemaInfo |
setMinimum(Number value)
Bean property setter:
|
SchemaInfo |
setMinItems(Integer value)
Bean property setter:
|
SchemaInfo |
setMinLength(Integer value)
Bean property setter:
|
SchemaInfo |
setMinProperties(Integer value)
Bean property setter:
|
SchemaInfo |
setMultipleOf(Number value)
Bean property setter:
|
SchemaInfo |
setPattern(String value)
Bean property setter:
|
SchemaInfo |
setProperties(Map<String,Map<String,Object>> value)
Bean property setter:
|
SchemaInfo |
setReadOnly(Boolean value)
Bean property setter:
|
SchemaInfo |
setRequired(Boolean value)
Bean property setter:
|
SchemaInfo |
setTitle(String value)
Bean property setter:
|
SchemaInfo |
setType(String value)
Bean property setter:
|
SchemaInfo |
setUniqueItems(Boolean value)
Bean property setter:
|
SchemaInfo |
setXml(Xml value)
Bean property setter:
|
SchemaInfo |
title(Object value)
Same as
setTitle(String) . |
SchemaInfo |
type(Object value)
Same as
setType(String) . |
SchemaInfo |
uniqueItems(Object value)
Same as
setUniqueItems(Boolean) . |
SchemaInfo |
xml(Object value)
Same as
setXml(Xml) . |
getExtraProperties, isStrict, strict, strict, toString
public SchemaInfo()
public SchemaInfo setFormat(String value)
value
- The new value for this property.
public SchemaInfo format(Object value)
setFormat(String)
.value
- The new value for this property.
toString()
.
public String getTitle()
public SchemaInfo setTitle(String value)
value
- The new value for this property.
public SchemaInfo title(Object value)
setTitle(String)
.value
- The new value for this property.
toString()
.
public String getDescription()
public SchemaInfo setDescription(String value)
value
- The new value for this property.
public SchemaInfo description(Object value)
setDescription(String)
.value
- The new value for this property.
toString()
.
public Object getDefault()
Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object.
public SchemaInfo setDefault(Object value)
Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object.
value
- The new value for this property.
public SchemaInfo _default(Object value)
setDefault(Object)
.value
- The new value for this property.public Number getMultipleOf()
public SchemaInfo setMultipleOf(Number value)
value
- The new value for this property.
public SchemaInfo multipleOf(Object value)
setMultipleOf(Number)
.value
- The new value for this property.
toString()
then best number match.
public Number getMaximum()
public SchemaInfo setMaximum(Number value)
value
- The new value for this property.
public SchemaInfo maximum(Object value)
setMaximum(Number)
.value
- The new value for this property.
toString()
then best number match.
public Boolean getExclusiveMaximum()
public SchemaInfo setExclusiveMaximum(Boolean value)
value
- The new value for this property.
public SchemaInfo exclusiveMaximum(Object value)
setExclusiveMaximum(Boolean)
.value
- The new value for this property.
Boolean.valueOf (value.toString())
.
public Number getMinimum()
public SchemaInfo setMinimum(Number value)
value
- The new value for this property.
public SchemaInfo minimum(Object value)
setMinimum(Number)
.value
- The new value for this property.
toString()
then best number match.
public Boolean getExclusiveMinimum()
public SchemaInfo setExclusiveMinimum(Boolean value)
value
- The new value for this property.
public SchemaInfo exclusiveMinimum(Object value)
setExclusiveMinimum(Boolean)
.value
- The new value for this property.
Boolean.valueOf (value.toString())
.
public Integer getMaxLength()
public SchemaInfo setMaxLength(Integer value)
value
- The new value for this property.
public SchemaInfo maxLength(Object value)
setMaxLength(Integer)
.value
- The new value for this property.
Integer.valueOf (value.toString())
.
public Integer getMinLength()
public SchemaInfo setMinLength(Integer value)
value
- The new value for this property.
public SchemaInfo minLength(Object value)
setMinLength(Integer)
.value
- The new value for this property.
Integer.valueOf (value.toString())
.
public String getPattern()
public SchemaInfo setPattern(String value)
value
- The new value for this property.
public SchemaInfo pattern(Object value)
setPattern(String)
.value
- The new value for this property.
toString()
.
public Integer getMaxItems()
public SchemaInfo setMaxItems(Integer value)
value
- The new value for this property.
public SchemaInfo maxItems(Object value)
setMaxItems(Integer)
.value
- The new value for this property.
Integer.valueOf (value.toString())
.
public Integer getMinItems()
public SchemaInfo setMinItems(Integer value)
value
- The new value for this property.
public SchemaInfo minItems(Object value)
setMinItems(Integer)
.value
- The new value for this property.
Integer.valueOf (value.toString())
.
public Boolean getUniqueItems()
public SchemaInfo setUniqueItems(Boolean value)
value
- The new value for this property.
public SchemaInfo uniqueItems(Object value)
setUniqueItems(Boolean)
.value
- The new value for this property.
Boolean.valueOf (value.toString())
.
public Integer getMaxProperties()
public SchemaInfo setMaxProperties(Integer value)
value
- The new value for this property.
public SchemaInfo maxProperties(Object value)
setMaxProperties(Integer)
.value
- The new value for this property.
Integer.valueOf (value.toString())
.
public Integer getMinProperties()
public SchemaInfo setMinProperties(Integer value)
value
- The new value for this property.
public SchemaInfo minProperties(Object value)
setMinProperties(Integer)
.value
- The new value for this property.
Integer.valueOf (value.toString())
.
public Boolean getRequired()
public SchemaInfo setRequired(Boolean value)
value
- The new value for this property.
public SchemaInfo required(Object value)
setRequired(Boolean)
.value
- The new value for this property.
Boolean.valueOf (value.toString())
.
public List<Object> getEnum()
public SchemaInfo setEnum(Collection<Object> value)
value
- The new value for this property.
public SchemaInfo addEnum(Collection<Object> value)
value
- The values to add to this property.
public SchemaInfo _enum(Object... values)
values
- The values to add to this property.
Object
Collection<Object>
String
- JSON array representation of Collection<Object>
_enum(
String
- Individual values
_enum(
public String getType()
public SchemaInfo setType(String value)
value
- The new value for this property.
public SchemaInfo type(Object value)
setType(String)
.value
- The new value for this property.
toString()
.
public Items getItems()
public SchemaInfo setItems(Items value)
value
- The new value for this property.
public SchemaInfo items(Object value)
setItems(Items)
.public List<Object> getAllOf()
public SchemaInfo setAllOf(Collection<Object> value)
value
- The new value for this property.
public SchemaInfo addAllOf(Collection<Object> values)
values
- The values to add to this property.
public SchemaInfo allOf(Object... values)
values
- The values to add to this property.
Object
Collection<Object>
String
- JSON array representation of Collection<Object>
allOf(
String
- Individual values
allOf(
public Map<String,Map<String,Object>> getProperties()
public SchemaInfo setProperties(Map<String,Map<String,Object>> value)
value
- The new value for this property.
public SchemaInfo addProperties(Map<String,Map<String,Object>> values)
values
- The values to add to this property.
public SchemaInfo properties(Object... values)
values
- The values to add to this property.
Map<String,Map<String,Object>>
String
- JSON object representation of Map<String,Map<String,Object>>
properties(
public Map<String,Object> getAdditionalProperties()
public SchemaInfo setAdditionalProperties(Map<String,Object> value)
value
- The new value for this property.
public SchemaInfo addAdditionalProperties(Map<String,Object> values)
values
- The values to add to this property.
public SchemaInfo additionalProperty(String name, Object value)
name
- The extra property name.value
- The extra property value.public SchemaInfo additionalProperties(Object... values)
values
- The values to add to this property.
Map<String,Object>
String
- JSON object representation of Map<String,Object>
extraProperties(
public String getDiscriminator()
public SchemaInfo setDiscriminator(String value)
value
- The new value for this property.
public SchemaInfo discriminator(Object value)
setDiscriminator(String)
.value
- The new value for this property.
toString()
.
public Boolean getReadOnly()
public SchemaInfo setReadOnly(Boolean value)
value
- The new value for this property.
public SchemaInfo readOnly(Object value)
setReadOnly(Boolean)
.value
- The new value for this property.
Boolean.valueOf (value.toString())
.
public Xml getXml()
public SchemaInfo setXml(Xml value)
value
- The new value for this property.
public SchemaInfo xml(Object value)
setXml(Xml)
.public ExternalDocumentation getExternalDocs()
public SchemaInfo setExternalDocs(ExternalDocumentation value)
value
- The new value for this property.
public SchemaInfo externalDocs(Object value)
value
- The new value for this property.
ExternalDocumentation
String
- JSON object representation of ExternalDocumentation
externalDocs(
public Object getExample()
public SchemaInfo setExample(Object value)
value
- The new value for this property.
public SchemaInfo example(Object value)
setExample(Object)
.value
- The new value for this property.
public <T> T get(String property, Class<T> type)
SwaggerElement
Can be used to retrieve non-standard Swagger fields such as
get
in class SwaggerElement
property
- The property name to retrieve.type
- The datatype to cast the value to.public SchemaInfo set(String property, Object value)
SwaggerElement
Can be used to set non-standard Swagger fields such as
set
in class SwaggerElement
property
- The property name to set.value
- The new value for the property.Copyright © 2018 Apache. All rights reserved.