public class Schema<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected T |
_const |
protected T |
_default |
protected List<T> |
_enum |
static String |
BIND_TYPE_AND_TYPES |
protected T |
example |
protected Map<String,Object> |
jsonSchema |
protected Object |
jsonSchemaImpl |
| Modifier | Constructor and Description |
|---|---|
|
Schema() |
|
Schema(SpecVersion specVersion) |
protected |
Schema(String type,
String format) |
protected |
Schema(String type,
String format,
SpecVersion specVersion) |
| Modifier and Type | Method and Description |
|---|---|
Schema |
_const(Object _const) |
Schema |
_default(T _default) |
Schema |
_else(Schema _else) |
Schema |
_enum(List<T> _enum) |
Schema |
_if(Schema _if) |
Schema |
$anchor(String $anchor) |
Schema |
$comment(String $comment) |
Schema |
$id(String $id) |
Schema |
$ref(String $ref) |
Schema |
$schema(String $schema) |
Schema |
addAllOfItem(Schema allOfItem) |
Schema |
addAnyOfItem(Schema anyOfItem) |
void |
addEnumItemObject(T _enumItem) |
void |
addExample(T example) |
void |
addExtension(String name,
Object value) |
Schema |
additionalItems(Schema additionalItems) |
Schema |
additionalProperties(Object additionalProperties) |
Schema |
addOneOfItem(Schema oneOfItem) |
Schema |
addPatternProperty(String key,
Schema patternPropertiesItem) |
Schema |
addProperties(String key,
Schema property)
Deprecated.
|
Schema |
addProperty(String key,
Schema property) |
Schema |
addRequiredItem(String requiredItem) |
boolean |
addType(String type) |
Schema |
allOf(List<Schema> allOf) |
Schema |
anyOf(List<Schema> anyOf) |
Schema |
booleanSchemaValue(Boolean booleanSchemaValue) |
protected T |
cast(Object value) |
Schema |
contains(Schema contains) |
Schema |
contentEncoding(String contentEncoding) |
Schema |
contentMediaType(String contentMediaType) |
Schema |
contentSchema(Schema contentSchema) |
Schema |
dependentRequired(Map<String,List<String>> dependentRequired) |
Schema |
dependentSchemas(Map<String,Schema> dependentSchemas) |
Schema |
deprecated(Boolean deprecated) |
Schema |
description(String description) |
Schema |
discriminator(Discriminator discriminator) |
boolean |
equals(Object o) |
Schema |
example(Object example) |
Schema<T> |
examples(List<T> examples) |
Schema |
exampleSetFlag(boolean exampleSetFlag) |
Schema |
exclusiveMaximum(Boolean exclusiveMaximum) |
Schema |
exclusiveMaximumValue(BigDecimal exclusiveMaximumValue) |
Schema |
exclusiveMinimum(Boolean exclusiveMinimum) |
Schema |
exclusiveMinimumValue(BigDecimal exclusiveMinimumValue) |
Schema |
extensions(Map<String,Object> extensions) |
Schema |
externalDocs(ExternalDocumentation externalDocs) |
Schema |
format(String format) |
String |
get$anchor() |
String |
get$comment() |
String |
get$id() |
String |
get$ref()
returns the $ref property from a Schema instance.
|
String |
get$schema() |
Schema |
getAdditionalItems() |
Object |
getAdditionalProperties()
returns the additionalProperties property from a Schema instance.
|
List<Schema> |
getAllOf()
returns the allOf property from a ComposedSchema instance.
|
List<Schema> |
getAnyOf()
returns the anyOf property from a ComposedSchema instance.
|
Boolean |
getBooleanSchemaValue() |
T |
getConst() |
Schema |
getContains() |
String |
getContentEncoding() |
String |
getContentMediaType() |
Schema |
getContentSchema() |
T |
getDefault()
returns the _default property from a Schema instance.
|
Map<String,List<String>> |
getDependentRequired() |
Map<String,Schema> |
getDependentSchemas() |
Boolean |
getDeprecated()
returns the deprecated property from a Schema instance.
|
String |
getDescription()
returns the description property from a Schema instance.
|
Discriminator |
getDiscriminator()
returns the discriminator property from a AllOfSchema instance.
|
Schema |
getElse() |
List<T> |
getEnum() |
Object |
getExample()
returns the example property from a Schema instance.
|
List<T> |
getExamples() |
boolean |
getExampleSetFlag()
returns true if example setter has been invoked
Used to flag explicit setting to null of example (vs missing field) while deserializing from json/yaml string
|
Boolean |
getExclusiveMaximum()
returns the exclusiveMaximum property from a Schema instance for OpenAPI 3.0.x
|
BigDecimal |
getExclusiveMaximumValue()
returns the exclusiveMaximumValue property from a Schema instance for OpenAPI 3.1.x
|
Boolean |
getExclusiveMinimum()
returns the exclusiveMinimum property from a Schema instance for OpenAPI 3.0.x
|
BigDecimal |
getExclusiveMinimumValue()
returns the exclusiveMinimumValue property from a Schema instance for OpenAPI 3.1.x
|
Map<String,Object> |
getExtensions() |
ExternalDocumentation |
getExternalDocs()
returns the externalDocs property from a Schema instance.
|
String |
getFormat()
returns the format property from a Schema instance.
|
Schema |
getIf() |
Schema<?> |
getItems()
returns the items property from a ArraySchema instance.
|
Map<String,Object> |
getJsonSchema() |
Object |
getJsonSchemaImpl() |
Integer |
getMaxContains() |
BigDecimal |
getMaximum()
returns the maximum property from a Schema instance.
|
Integer |
getMaxItems()
returns the maxItems property from a Schema instance.
|
Integer |
getMaxLength()
returns the maxLength property from a Schema instance.
|
Integer |
getMaxProperties()
returns the maxProperties property from a Schema instance.
|
Integer |
getMinContains() |
BigDecimal |
getMinimum()
returns the minimum property from a Schema instance.
|
Integer |
getMinItems()
returns the minItems property from a Schema instance.
|
Integer |
getMinLength()
returns the minLength property from a Schema instance.
|
Integer |
getMinProperties()
returns the minProperties property from a Schema instance.
|
BigDecimal |
getMultipleOf()
returns the multipleOf property from a Schema instance.
|
String |
getName()
returns the name property from a from a Schema instance.
|
Schema |
getNot()
returns the not property from a Schema instance.
|
Boolean |
getNullable()
returns the nullable property from a Schema instance.
|
List<Schema> |
getOneOf()
returns the oneOf property from a ComposedSchema instance.
|
String |
getPattern()
returns the pattern property from a Schema instance.
|
Map<String,Schema> |
getPatternProperties()
returns the patternProperties property from a Schema instance.
|
List<Schema> |
getPrefixItems() |
Map<String,Schema> |
getProperties()
returns the properties property from a Schema instance.
|
Schema |
getPropertyNames() |
Boolean |
getReadOnly()
returns the readOnly property from a Schema instance.
|
List<String> |
getRequired()
returns the required property from a Schema instance.
|
SpecVersion |
getSpecVersion() |
Schema |
getThen() |
String |
getTitle()
returns the title property from a Schema instance.
|
String |
getType()
returns the type property from a Schema instance.
|
Set<String> |
getTypes() |
Schema |
getUnevaluatedItems() |
Schema |
getUnevaluatedProperties() |
Boolean |
getUniqueItems()
returns the uniqueItems property from a Schema instance.
|
Boolean |
getWriteOnly()
returns the writeOnly property from a Schema instance.
|
XML |
getXml()
returns the xml property from a Schema instance.
|
int |
hashCode() |
Schema |
items(Schema<?> items) |
Schema |
jsonSchema(Map<String,Object> jsonSchema) |
Schema |
jsonSchemaImpl(Object jsonSchemaImpl) |
Schema |
maxContains(Integer maxContains) |
Schema |
maximum(BigDecimal maximum) |
Schema |
maxItems(Integer maxItems) |
Schema |
maxLength(Integer maxLength) |
Schema |
maxProperties(Integer maxProperties) |
Schema |
minContains(Integer minContains) |
Schema |
minimum(BigDecimal minimum) |
Schema |
minItems(Integer minItems) |
Schema |
minLength(Integer minLength) |
Schema |
minProperties(Integer minProperties) |
Schema |
multipleOf(BigDecimal multipleOf) |
Schema |
name(String name) |
Schema |
not(Schema not) |
Schema |
nullable(Boolean nullable) |
Schema |
oneOf(List<Schema> oneOf) |
Schema |
pattern(String pattern) |
Schema |
patternProperties(Map<String,Schema> patternProperties) |
Schema |
prefixItems(List<Schema> prefixItems) |
Schema |
properties(Map<String,Schema> properties) |
Schema |
propertyNames(Schema propertyNames) |
Schema |
raw$ref(String $ref) |
Schema |
readOnly(Boolean readOnly) |
Schema |
required(List<String> required) |
void |
set$anchor(String $anchor) |
void |
set$comment(String $comment) |
void |
set$id(String $id) |
void |
set$ref(String $ref) |
void |
set$schema(String $schema) |
void |
setAdditionalItems(Schema additionalItems) |
void |
setAdditionalProperties(Object additionalProperties) |
void |
setAllOf(List<Schema> allOf) |
void |
setAnyOf(List<Schema> anyOf) |
void |
setBooleanSchemaValue(Boolean booleanSchemaValue) |
void |
setConst(Object _const) |
void |
setContains(Schema contains) |
void |
setContentEncoding(String contentEncoding) |
void |
setContentMediaType(String contentMediaType) |
void |
setContentSchema(Schema contentSchema) |
void |
setDefault(Object _default) |
void |
setDependentRequired(Map<String,List<String>> dependentRequired) |
void |
setDependentSchemas(Map<String,Schema> dependentSchemas) |
void |
setDeprecated(Boolean deprecated) |
void |
setDescription(String description) |
void |
setDiscriminator(Discriminator discriminator) |
void |
setElse(Schema _else) |
void |
setEnum(List<T> _enum) |
void |
setExample(Object example) |
void |
setExamples(List<T> examples) |
void |
setExampleSetFlag(boolean exampleSetFlag) |
void |
setExclusiveMaximum(Boolean exclusiveMaximum) |
void |
setExclusiveMaximumValue(BigDecimal exclusiveMaximumValue) |
void |
setExclusiveMinimum(Boolean exclusiveMinimum) |
void |
setExclusiveMinimumValue(BigDecimal exclusiveMinimumValue) |
void |
setExtensions(Map<String,Object> extensions) |
void |
setExternalDocs(ExternalDocumentation externalDocs) |
void |
setFormat(String format) |
void |
setIf(Schema _if) |
void |
setItems(Schema<?> items) |
void |
setJsonSchema(Map<String,Object> jsonSchema) |
void |
setJsonSchemaImpl(Object jsonSchemaImpl) |
void |
setMaxContains(Integer maxContains) |
void |
setMaximum(BigDecimal maximum) |
void |
setMaxItems(Integer maxItems) |
void |
setMaxLength(Integer maxLength) |
void |
setMaxProperties(Integer maxProperties) |
void |
setMinContains(Integer minContains) |
void |
setMinimum(BigDecimal minimum) |
void |
setMinItems(Integer minItems) |
void |
setMinLength(Integer minLength) |
void |
setMinProperties(Integer minProperties) |
void |
setMultipleOf(BigDecimal multipleOf) |
void |
setName(String name) |
void |
setNot(Schema not) |
void |
setNullable(Boolean nullable) |
void |
setOneOf(List<Schema> oneOf) |
void |
setPattern(String pattern) |
void |
setPatternProperties(Map<String,Schema> patternProperties) |
void |
setPrefixItems(List<Schema> prefixItems) |
void |
setProperties(Map<String,Schema> properties) |
void |
setPropertyNames(Schema propertyNames) |
void |
setReadOnly(Boolean readOnly) |
void |
setRequired(List<String> required) |
void |
setSpecVersion(SpecVersion specVersion) |
void |
setThen(Schema then) |
void |
setTitle(String title) |
void |
setType(String type) |
void |
setTypes(Set<String> types) |
void |
setUnevaluatedItems(Schema unevaluatedItems) |
void |
setUnevaluatedProperties(Schema unevaluatedProperties) |
void |
setUniqueItems(Boolean uniqueItems) |
void |
setWriteOnly(Boolean writeOnly) |
void |
setXml(XML xml) |
Schema |
specVersion(SpecVersion specVersion) |
Schema |
then(Schema then) |
Schema |
title(String title) |
protected String |
toIndentedString(Object o)
Convert the given object to string with each line indented by 4 spaces
(except the first line).
|
String |
toString() |
Schema |
type(String type) |
Schema |
types(Set<String> types) |
Schema |
unevaluatedItems(Schema unevaluatedItems) |
Schema |
unevaluatedProperties(Schema unevaluatedProperties) |
Schema |
uniqueItems(Boolean uniqueItems) |
Schema |
writeOnly(Boolean writeOnly) |
Schema |
xml(XML xml) |
public static final String BIND_TYPE_AND_TYPES
protected T _default
protected T example
protected T _const
protected transient Object jsonSchemaImpl
public Schema()
public Schema(SpecVersion specVersion)
protected Schema(String type, String format, SpecVersion specVersion)
public SpecVersion getSpecVersion()
public void setSpecVersion(SpecVersion specVersion)
public Schema specVersion(SpecVersion specVersion)
public Schema getContains()
public void setContains(Schema contains)
public String get$id()
public void set$id(String $id)
public String get$schema()
public void set$schema(String $schema)
public String get$anchor()
public void set$anchor(String $anchor)
public BigDecimal getExclusiveMaximumValue()
public void setExclusiveMaximumValue(BigDecimal exclusiveMaximumValue)
public Schema exclusiveMaximumValue(BigDecimal exclusiveMaximumValue)
public BigDecimal getExclusiveMinimumValue()
public void setExclusiveMinimumValue(BigDecimal exclusiveMinimumValue)
public Schema exclusiveMinimumValue(BigDecimal exclusiveMinimumValue)
public Map<String,Schema> getPatternProperties()
public void setPatternProperties(Map<String,Schema> patternProperties)
public Schema patternProperties(Map<String,Schema> patternProperties)
public Schema addPatternProperty(String key, Schema patternPropertiesItem)
public boolean addType(String type)
public Object getJsonSchemaImpl()
public void setJsonSchemaImpl(Object jsonSchemaImpl)
public List<Schema> getAllOf()
public List<Schema> getAnyOf()
public List<Schema> getOneOf()
public Schema<?> getItems()
public void setItems(Schema<?> items)
public String getName()
public void setName(String name)
public Discriminator getDiscriminator()
public void setDiscriminator(Discriminator discriminator)
public Schema discriminator(Discriminator discriminator)
public String getTitle()
public void setTitle(String title)
public T getDefault()
public void setDefault(Object _default)
public void addEnumItemObject(T _enumItem)
public BigDecimal getMultipleOf()
minimum: 0
public void setMultipleOf(BigDecimal multipleOf)
public Schema multipleOf(BigDecimal multipleOf)
public BigDecimal getMaximum()
public void setMaximum(BigDecimal maximum)
public Schema maximum(BigDecimal maximum)
public Boolean getExclusiveMaximum()
public void setExclusiveMaximum(Boolean exclusiveMaximum)
public BigDecimal getMinimum()
public void setMinimum(BigDecimal minimum)
public Schema minimum(BigDecimal minimum)
public Boolean getExclusiveMinimum()
public void setExclusiveMinimum(Boolean exclusiveMinimum)
public Integer getMaxLength()
minimum: 0
public void setMaxLength(Integer maxLength)
public Integer getMinLength()
minimum: 0
public void setMinLength(Integer minLength)
public String getPattern()
public void setPattern(String pattern)
public Integer getMaxItems()
minimum: 0
public void setMaxItems(Integer maxItems)
public Integer getMinItems()
minimum: 0
public void setMinItems(Integer minItems)
public Boolean getUniqueItems()
public void setUniqueItems(Boolean uniqueItems)
public Integer getMaxProperties()
minimum: 0
public void setMaxProperties(Integer maxProperties)
public Integer getMinProperties()
minimum: 0
public void setMinProperties(Integer minProperties)
public List<String> getRequired()
public String getType()
public void setType(String type)
public Schema getNot()
public void setNot(Schema not)
public Map<String,Schema> getProperties()
@Deprecated public Schema addProperties(String key, Schema property)
public Object getAdditionalProperties()
public void setAdditionalProperties(Object additionalProperties)
public String getDescription()
public void setDescription(String description)
public String getFormat()
public void setFormat(String format)
public String get$ref()
public void set$ref(String $ref)
public Boolean getNullable()
public void setNullable(Boolean nullable)
public Boolean getReadOnly()
public void setReadOnly(Boolean readOnly)
public Boolean getWriteOnly()
public void setWriteOnly(Boolean writeOnly)
public Object getExample()
public void setExample(Object example)
public ExternalDocumentation getExternalDocs()
public void setExternalDocs(ExternalDocumentation externalDocs)
public Schema externalDocs(ExternalDocumentation externalDocs)
public Boolean getDeprecated()
public void setDeprecated(Boolean deprecated)
public XML getXml()
public void setXml(XML xml)
public boolean getExampleSetFlag()
public void setExampleSetFlag(boolean exampleSetFlag)
public String getContentEncoding()
public void setContentEncoding(String contentEncoding)
public String getContentMediaType()
public void setContentMediaType(String contentMediaType)
public Schema contentMediaType(String contentMediaType)
public Schema getContentSchema()
public void setContentSchema(Schema contentSchema)
public Schema getPropertyNames()
public void setPropertyNames(Schema propertyNames)
public Schema getUnevaluatedProperties()
public void setUnevaluatedProperties(Schema unevaluatedProperties)
public Schema unevaluatedProperties(Schema unevaluatedProperties)
public Integer getMaxContains()
public void setMaxContains(Integer maxContains)
public Integer getMinContains()
public void setMinContains(Integer minContains)
public Schema getAdditionalItems()
public void setAdditionalItems(Schema additionalItems)
public Schema getUnevaluatedItems()
public void setUnevaluatedItems(Schema unevaluatedItems)
public Schema unevaluatedItems(Schema unevaluatedItems)
public Schema getIf()
public void setIf(Schema _if)
public Schema getElse()
public void setElse(Schema _else)
public Schema getThen()
public void setThen(Schema then)
public void setDependentSchemas(Map<String,Schema> dependentSchemas)
public Schema dependentSchemas(Map<String,Schema> dependentSchemas)
public Map<String,List<String>> getDependentRequired()
public void setDependentRequired(Map<String,List<String>> dependentRequired)
public Schema dependentRequired(Map<String,List<String>> dependentRequired)
public String get$comment()
public void set$comment(String $comment)
public void addExample(T example)
protected String toIndentedString(Object o)
public Schema exampleSetFlag(boolean exampleSetFlag)
public T getConst()
public void setConst(Object _const)
public Boolean getBooleanSchemaValue()
public void setBooleanSchemaValue(Boolean booleanSchemaValue)
Copyright © 2022. All rights reserved.