Top Description Inners Methods
org.eclipse.microprofile.openapi.models.media

public Interface Schema

extends Extensible<Schema>, Constructible, Reference<Schema>
Imports
java.math.BigDecimal, java.util.List, .Map, org.eclipse.microprofile.openapi.OASFactory, org.eclipse.microprofile.openapi.models.Constructible, .Extensible, .ExternalDocumentation, .Reference

The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 2020-12.

For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema.

Any time a Schema Object can be used, a Reference Object can be used in its place. This allows referencing an existing definition instead of defining the same Schema again.

See Also
OpenAPI Specification Schema Object

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
Schema.SchemaType

The values allowed for the type field.

Method Summary

Modifier and TypeMethod and Description
public Schema

Returns:

the current Schema instance
addAllOf
(Schema
a Schema to use with the allOf property
allOf
)

Adds the given Schema to the list of schemas used by the allOf property.

public Schema

Returns:

the current Schema instance
addAnyOf
(Schema
a Schema to use with the anyOf property
anyOf
)

Adds the given Schema to the list of schemas used by the anyOf property.

public Schema

Returns:

the current Schema instance
addDependentRequired
(String
the property name
propertyName
,
List<String>
the names of additional properties which are required if propertyName exists to add
additionalRequiredPropertyNames
)

Sets the list of additional property names that are required if a property named propertyName exists.

public Schema

Returns:

the current Schema instance
addDependentSchema
(String
the property name
propertyName
,
Schema
the dependent schema
schema
)

Sets the dependent schema for a property name.

public Schema

Returns:

current Schema instance
addEnumeration
(Object
an object to add to the enumerated values
enumeration
)

Adds an item of the appropriate type to the enumerated list of values allowed.

public Schema

Returns:

current Schema instance
addExample
(Object
the example to add to the examples list
example
)

Adds an example to the examples list.

public default Schema

Returns:

the current Schema instance
additionalPropertiesBoolean
(Boolean
a Schema which defines additional properties
additionalProperties
)
Deprecated since 4.0. use additionalPropertiesSchema(Schema) with a boolean-valued schema

Sets the value of "additionalProperties" to either True or False.

public default Schema

Returns:

the current Schema instance
additionalPropertiesSchema
(Schema
a Schema which defines additional properties
additionalProperties
)

Sets the Schema which defines additional properties not defined by "properties" or "patternProperties".

public Schema

Returns:

the current Schema instance
addOneOf
(Schema
a Schema to use with the oneOf property
oneOf
)

Adds the given Schema to the list of schemas used by the oneOf property.

public Schema

Returns:

the current Schema instance
addPatternProperty
(String
the regular expression to add
regularExpression
,
Schema
the schema that a property value must validate against if its name matches regularExpression
schema
)

Adds a regular expression and schema pair to the list of pattern properties.

public Schema

Returns:

current Schema instance
addPrefixItem
(Schema
the schema to add to the prefixItems list
prefixItem
)

Adds a schema to the end of the prefixItems list.

public Schema

Returns:

the current Schema instance
addProperty
(String
the name of a new Schema property
key
,
Schema
the Schema which describes the properties of the named property. null values will be rejected (implementation will throw an exception) or ignored.
propertySchema
)

Adds a Schema property of the provided name using the given schema.

public Schema

Returns:

the current Schema instance
addRequired
(String
the name of an item required in objects defined by this Schema instance
required
)

Adds the name of an item to the list of fields required in objects defined by this Schema.

public Schema

Returns:

current Schema instance
addType
(Schema.SchemaType
the type to add to the type list
type
)

Adds a type to the type list.

public default Schema

Returns:

the current Schema instance
allOf
(List<Schema>
the list of schemas used by the allOf property
allOf
)

Sets the schemas used by the allOf property of this Schema.

public default Schema

Returns:

the current Schema instance
anyOf
(List<Schema>
the list of schemas used by the anyOf property
anyOf
)

Sets the schemas used by the anyOf property of this Schema.

public default Schema

Returns:

the current Schema instance
booleanSchema
(Boolean
the boolean value of this schema, or null if it is not a boolean schema
booleanSchema
)

Sets this schema to a boolean value.

public default Schema

Returns:

the current Schema instance
comment
(String
the comment, or null to remove any comment
comment
)

Sets the comment to be included in the $comment property of the schema.

public default Schema

Returns:

the current Schema instance
constValue
(Object
the value that the object must have
constValue
)

Sets the const property from this Schema instance.

public default Schema

Returns:

the current Schema instance
contains
(Schema
a schema that one item in the array should match
contains
)

Sets the contains property of this Schema instance.

public default Schema

Returns:

the current Schema instance
contentEncoding
(String
the encoding type
contentEncoding
)

Sets the contentEncoding property from this Schema instance.

public default Schema

Returns:

the current Schema instance
contentMediaType
(String
the media type
contentMediaType
)

Sets the contentMediaType property from this Schema instance.

public default Schema

Returns:

the current Schema instance
contentSchema
(Schema
the schema for the data within the string
contentSchema
)

Sets the contentSchema property from this Schema instance.

public default Schema

Returns:

the current Schema instance
defaultValue
(Object
a value to use as the default
defaultValue
)

Set the default value property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
dependentRequired
(Map<String, List<String>>
a map of property names to lists of additional required property names
dependentRequired
)

Sets the dependentRequired property of this Schema instance.

public default Schema

Returns:

the current Schema instance
dependentSchemas
(Map<String, Schema>
a map of properties and their dependent schemas
dependentSchemas
)

Sets the dependentSchemas property of this Schema instance.

public default Schema

Returns:

the current Schema instance
deprecated
(Boolean
true to indicate this Schema is deprecated
deprecated
)

Sets the deprecated property of this Schema.

public default Schema

Returns:

the current Schema instance
description
(String
a string containing a description of the purpose of this Schema
description
)

Sets the description property of this Schema to the given string.

public default Schema

Returns:

the current Schema instance
discriminator
(Discriminator
the object that is used to differentiate between the schemas which may satisfy the payload description
discriminator
)

Sets the discriminator property of this Schema instance to the given object.

public default Schema

Returns:

the current Schema instance
elseSchema
(Schema
the else schema
elseSchema
)

Sets the "else" schema.

public default Schema
enumeration(List<Object> enumeration)

public default Schema

Returns:

the current Schema instance
example
(Object
an object which is an instance of this Schema
example
)
Deprecated since 4.0. use examples(List)

Sets the example property of this Schema instance.

public default Schema

Returns:

current Schema instance
examples
(List<Object>
a list of example objects which this schema could describe
examples
)

Sets the examples property of this Schema instance.

public default Schema

Returns:

the current Schema instance
exclusiveMaximum
(BigDecimal
the value that a numeric object must be less than
exclusiveMaximum
)

Sets the exclusiveMaximum property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
exclusiveMinimum
(BigDecimal
the value that a numeric object must be greater than
exclusiveMinimum
)

Sets the exclusiveMinimum property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
externalDocs
(ExternalDocumentation
an additional external documentation object
externalDocs
)

Sets the externalDocs property of this Schema to the indicated value.

public default Schema

Returns:

the current Schema instance
format
(String
the string specifying the data format
format
)

Sets the format property of this Schema instance to the given string.

public Object

Returns:

the value of the named property, or null if a property with the given name is not set
get
(String
the property name
propertyName
)

Gets a schema property by name.

public Boolean

Returns:

this Schema's additionalProperties property (as Boolean)
getAdditionalPropertiesBoolean
()
Deprecated since 4.0. use getAdditionalPropertiesSchema() which may return a boolean-valued schema

Returns the value of the "additionalProperties" setting, which indicates whether properties not otherwise defined are allowed.

public Schema

Returns:

this Schema's additionalProperties property (as Schema)
getAdditionalPropertiesSchema
()

Returns the value of the "additionalProperties" setting, which indicates whether properties not otherwise defined are allowed.

public Map<String, ?>

Returns:

a Map of property names to their corresponding values
getAll
()

Gets all properties of a schema.

public List<Schema>

Returns:

a copy List (potentially immutable) of schemas used by the allOf property
getAllOf
()

Returns the schemas used by the allOf property.

public List<Schema>

Returns:

a copy List (potentially immutable) of schemas used by the anyOf property
getAnyOf
()

Returns the schemas used by the anyOf property.

public Boolean

Returns:

the boolean value of this schema, or null if it is not a boolean schema
getBooleanSchema
()

Returns whether this Schema is a boolean schema.

public String

Returns:

the comment, or null if no comment is set
getComment
()

Returns the comment to be included in the $comment property of the schema.

public Object

Returns:

the value that the object must have
getConstValue
()

Returns the const property from this Schema instance.

public Schema

Returns:

a schema that one item in the array should match
getContains
()

Returns the contains property of this Schema instance.

public String

Returns:

the encoding type
getContentEncoding
()

Returns the contentEncoding property from this Schema instance.

public String

Returns:

the media type
getContentMediaType
()

Returns the contentMediaType property from this Schema instance.

public Schema

Returns:

the schema for the data within the string
getContentSchema
()

Returns the contentSchema property from this Schema instance.

public Object

Returns:

the default value object
getDefaultValue
()

Returns the default value property from this Schema instance.

public Map<String, List<String>>

Returns:

a copy Map (potentially immutable) of property names to lists of additional required property names
getDependentRequired
()

Returns the dependentRequired property of this Schema instance.

public Map<String, Schema>

Returns:

a copy Map (potentially immutable) of properties and their dependent schemas
getDependentSchemas
()

Returns the dependentSchemas property of this Schema instance.

public Boolean

Returns:

indication that the Schema is deprecated and should be transitioned out of usage
getDeprecated
()

Returns the deprecated property from this Schema instance.

public String

Returns:

a string containing a description
getDescription
()

Returns a description of the purpose of this Schema.

public Discriminator

Returns:

the discriminator that is used to differentiate between the schemas which may satisfy the payload description
getDiscriminator
()

Returns the discriminator property from this Schema instance.

public Schema

Returns:

the else schema
getElseSchema
()

Returns the "else" schema.

public List<Object>

Returns:

a copy List (potentially immutable) of values allowed for objects defined by this Schema
getEnumeration
()

Returns the enumerated list of values allowed for objects defined by this Schema.

public Object

Returns:

an object which is an example of an instance of this Schema
getExample
()
Deprecated since 4.0. use getExamples()

Returns the example property from this Schema instance.

public List<Object>

Returns:

a copy List (potentially immutable) of example objects which this schema could describe
getExamples
()

Returns the examples property of this Schema instance.

public BigDecimal

Returns:

the value that a numeric object must be less than
getExclusiveMaximum
()

Returns the exclusiveMaximum property from this Schema instance.

public BigDecimal

Returns:

the value that a numeric object must be greater than
getExclusiveMinimum
()

Returns the exclusiveMinimum property from this Schema instance.

public ExternalDocumentation

Returns:

additional external documentation for this Schema
getExternalDocs
()

Returns the externalDocs property from this Schema instance.

public String

Returns:

a string describing the format of the data in this Schema
getFormat
()

Returns the format property from this Schema instance.

public Schema

Returns:

the if schema
getIfSchema
()

Returns the "if" schema.

public Schema

Returns:

the Schema used for all the elements
getItems
()

Returns the Schema used for all the elements of an array typed Schema.

public Integer

Returns:

the max number of items which may be matched by contains
getMaxContains
()

Returns the maxContains property from this Schema instance.

public BigDecimal

Returns:

the value that a numeric object must be less than or equal to
getMaximum
()

Returns the maximum property from this Schema instance.

public Integer

Returns:

the maximum number of elements in the object e.g. array elements
getMaxItems
()

Returns the maxItems property from this Schema instance.

public Integer

Returns:

the maximum length of objects e.g. strings
getMaxLength
()

Returns the maxLength property from this Schema instance.

public Integer

Returns:

the maximum number of properties allowed in the object
getMaxProperties
()

Returns the maxProperties property from this Schema instance.

public Integer

Returns:

the minimum number of items which may be matched by contains
getMinContains
()

Returns the minContains property from this Schema instance.

public BigDecimal

Returns:

the value that a numeric object must be greater than or equal to
getMinimum
()

Returns the minimum property from this Schema instance.

public Integer

Returns:

the minimum number of elements in the object e.g. array elements
getMinItems
()

Returns the minItems property from this Schema instance.

public Integer

Returns:

the minimum length of objects e.g. strings
getMinLength
()

Returns the minLength property from this Schema instance.

public Integer

Returns:

the minimum number of properties allowed in the object
getMinProperties
()

Returns the minProperties property from this Schema instance.

public BigDecimal

Returns:

the positive number that restricts the value of the object
getMultipleOf
()

Returns the multipleOf property from this Schema instance.

public Schema

Returns:

the not property's schema
getNot
()

Returns a Schema which describes properties not allowed in objects defined by the current schema.

public List<Schema>

Returns:

a copy List (potentially immutable) of schemas used by the oneOf property
getOneOf
()

Returns the schemas used by the oneOf property.

public String

Returns:

the regular expression which restricts the value of an object e.g. a string
getPattern
()

Returns the pattern property from this Schema instance.

public Map<String, Schema>

Returns:

a copy Map (potentially immutable) of regular expression and schema pairs
getPatternProperties
()

Returns the patternProperties property from this Schema instance.

public List<Schema>

Returns:

a copy List (potentially immutable) of prefix item schemas
getPrefixItems
()

Returns the prefixItems property of this Schema instance.

public Map<String, Schema>

Returns:

a copy Map (potentially immutable) which associates property names with the schemas that describe their contents
getProperties
()

Returns the properties defined in this Schema.

public Schema

Returns:

the schema which each property name must validate against
getPropertyNames
()

Returns the propertyNames property from this Schema instance.

public Boolean

Returns:

indication that the Schema is only valid in a response message
getReadOnly
()

Returns the readOnly property from this Schema instance.

public List<String>

Returns:

a copy List (potentially immutable) of fields required in objects defined by this Schema
getRequired
()

Returns the required property from this Schema instance.

public String

Returns:

the schema dialect name, or null for the default
getSchemaDialect
()

Returns the schema dialect in use.

public Schema

Returns:

the then schema
getThenSchema
()

Returns the "then" schema.

public String

Returns:

the title assigned to this Schema
getTitle
()

Returns the title property from this Schema instance.

public List<Schema.SchemaType>

Returns:

a copy List (potentially immutable) of the allowed types
getType
()

Returns the type property of this Schema instance.

public Schema

Returns:

a schema that unevaluated array items must validate against
getUnevaluatedItems
()

Returns the unevaluatedItems property of this Schema instance.

public Schema

Returns:

a schema that unevaluated object properties must validate against
getUnevaluatedProperties
()

Returns the unevaluatedProperties property of this Schema instance.

public Boolean

Returns:

whether to ensure items are unique
getUniqueItems
()

Returns the uniqueItems property from this Schema instance.

public Boolean

Returns:

indication that the Schema is only valid in a request message
getWriteOnly
()

Returns the writeOnly property from this Schema instance.

public XML

Returns:

a metadata object that allows for more fine-tuned XML model definitions
getXml
()

Returns the xml property from this Schema instance.

public default Schema

Returns:

the current Schema instance
ifSchema
(Schema
the if schema
ifSchema
)

Sets the "if" schema.

public default Schema

Returns:

the current Schema instance
items
(Schema
the Schema used by this array
items
)

Set the Schema used for all the elements of an array typed Schema.

public default Schema

Returns:

the current Schema instance
maxContains
(Integer
the maximum number of items which may be matched by contains
maxContains
)

Sets the maxContains property from this Schema instance.

public default Schema

Returns:

the current Schema instance
maximum
(BigDecimal
the value that a numeric object must be less than or equal to
maximum
)

Sets the maximum property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
maxItems
(Integer
the maximum number of elements in objects defined by this Schema e.g. array elements
maxItems
)

Sets the maxItems property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
maxLength
(Integer
the maximum length of objects defined by this Schema
maxLength
)

Sets the maxLength property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
maxProperties
(Integer
limit the number of properties in objects defined by this Schema
maxProperties
)

Sets the maxProperties property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
minContains
(Integer
the minimum number of items which may be matched by contains
minContains
)

Sets the minContains property from this Schema instance.

public default Schema

Returns:

the current Schema instance
minimum
(BigDecimal
the value that a numeric object must be greater than or equal to
minimum
)

Sets the minimum property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
minItems
(Integer
the minimum number of elements in objects defined by this Schema e.g. array elements
minItems
)

Sets the minItems property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
minLength
(Integer
the minimum length of objects defined by this Schema
minLength
)

Sets the minLength property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
minProperties
(Integer
limit the number of properties in objects defined by this Schema
minProperties
)

Sets the minProperties property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
multipleOf
(BigDecimal
a positive number that restricts the value of objects described by this Schema
multipleOf
)

Sets the multipleOf property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
not
(Schema
the Schema which describes properties not allowed
not
)

Sets the not property to a Schema which describes properties not allowed in objects defined by the current schema.

public default Schema

Returns:

the current Schema instance
oneOf
(List<Schema>
the list of schemas used by the oneOf property
oneOf
)

Sets the schemas used by the oneOf property of this Schema.

public default Schema

Returns:

the current Schema instance
pattern
(String
the regular expression which restricts objects defined by this Schema
pattern
)

Sets the pattern property of this Schema instance to the string given.

public default Schema

Returns:

the current Schema instance
patternProperties
(Map<String, Schema>
a map of regular expression and schema pairs
patternProperties
)

Sets the patternProperties property from this Schema instance.

public default Schema

Returns:

current Schema instance
prefixItems
(List<Schema>
a list of prefix item schemas
prefixItems
)

Sets the prefixItems property of this Schema instance.

public default Schema

Returns:

the current Schema instance
properties
(Map<String, Schema>
a map which associates property names with the schemas that describe their contents
properties
)

Sets the properties of this Schema instance to the map provided.

public default Schema

Returns:

the current Schema instance
propertyNames
(Schema
the schema which each property name must validate against
propertyNameSchema
)

Sets the propertyNames property from this Schema instance.

public default Schema

Returns:

the current Schema instance
readOnly
(Boolean
true indicates the Schema should not be sent as part of a request message
readOnly
)

Sets the readOnly property of this Schema.

public void
removeAllOf(Schema
a Schema to use with the allOf property
allOf
)

Removes the given Schema to the list of schemas used by the allOf property.

public void
removeAnyOf(Schema
a Schema to use with the anyOf property
anyOf
)

Removes the given Schema to the list of schemas used by the anyOf property.

public void
removeDependentRequired(String
the property name
propertyName
)

Removes the list of additional property names that are required if a property named propertyName exists.

public void
removeDependentSchema(String
the property name
propertyName
)

Removes the dependent schema for a property name.

public void
removeEnumeration(Object
an object to add to the enumerated values
enumeration
)

Removes an item of the appropriate type to the enumerated list of values allowed.

public void
removeExample(Object
the example to remove from the examples list
example
)

Removes an example from the examples list.

public void
removeOneOf(Schema
a Schema to use with the oneOf property
oneOf
)

Removes the given Schema to the list of schemas used by the oneOf property.

public void
removePatternProperty(String
the regular expression to remove
regularExpression
)

Removes a regular expression and its corresponding schema pair from the list of pattern properties.

public void
removePrefixItem(Schema
the schema to remove from the prefixItems list
prefixItem
)

Removes a schema from the prefixItems list.

public void
removeProperty(String
the name of a new Schema property
key
)

Removes a Schema property of the provided name using the given schema.

public void
removeRequired(String
the name of an item required in objects defined by this Schema instance
required
)

Removes the name of an item to the list of fields required in objects defined by this Schema.

public void
removeType(Schema.SchemaType
the type to remove from the type list
type
)

Removes a type from the type list.

public default Schema

Returns:

the current Schema instance
required
(List<String>
the list of fields required in objects defined by this Schema
required
)

Sets the list of fields required in objects defined by this Schema.

public default Schema

Returns:

the current Schema instance
schemaDialect
(String
the schema dialect name, or null for the default
schemaDialect
)

Sets the schema dialect in use.

public Schema

Returns:

the current Schema instance
set
(String
the property name
propertyName
,
Object
the value to set, or null to remove the property
value
)

Sets a schema property.

public void
setAdditionalPropertiesBoolean(Boolean
a Schema which defines additional properties
additionalProperties
)
Deprecated since 4.0. use setAdditionalPropertiesSchema(Schema) with a boolean-valued schema

Sets the value of "additionalProperties" to either True or False.

public void
setAdditionalPropertiesSchema(Schema
a Schema which defines additional properties
additionalProperties
)

Sets the Schema which defines additional properties not defined by "properties" or "patternProperties".

public void
setAll(Map<String, ?>
the properties to set. Each value in the map must be valid according to the rules in set(String, Object)
allProperties
)

Sets all properties of a schema.

public void
setAllOf(List<Schema>
the list of schemas used by the allOf property
allOf
)

Sets the schemas used by the allOf property of this Schema.

public void
setAnyOf(List<Schema>
the list of schemas used by the anyOf property
anyOf
)

Sets the schemas used by the anyOf property of this Schema.

public void
setBooleanSchema(Boolean
the boolean value of this schema, or null if it is not a boolean schema
booleanSchema
)

Sets this schema to a boolean value.

public void
setComment(String
the comment, or null to remove any comment
comment
)

Sets the comment to be included in the $comment property of the schema.

public void
setConstValue(Object
the value that the object must have
constValue
)

Sets the const property from this Schema instance.

public void
setContains(Schema
a schema that one item in the array should match
contains
)

Sets the contains property of this Schema instance.

public void
setContentEncoding(String
the encoding type
contentEncoding
)

Sets the contentEncoding property from this Schema instance.

public void
setContentMediaType(String
the media type
contentMediaType
)

Sets the contentMediaType property from this Schema instance.

public void
setContentSchema(Schema
the schema for the data within the string
contentSchema
)

Sets the contentSchema property from this Schema instance.

public void
setDefaultValue(Object
a value to use as the default
defaultValue
)

Set the default value property of this Schema instance to the value given.

public void
setDependentRequired(Map<String, List<String>>
a map of property names to lists of additional required property names
dependentRequired
)

Sets the dependentRequired property of this Schema instance.

public void
setDependentSchemas(Map<String, Schema>
a map of properties and their dependent schemas
dependentSchemas
)

Sets the dependentSchemas property of this Schema instance.

public void
setDeprecated(Boolean
true to indicate this Schema is deprecated
deprecated
)

Sets the deprecated property of this Schema.

public void
setDescription(String
a string containing a description of the purpose of this Schema
description
)

Sets the description property of this Schema to the given string.

public void
setDiscriminator(Discriminator
the object that is used to differentiate between the schemas which may satisfy the payload description
discriminator
)

Sets the discriminator property of this Schema instance to the given object.

public void
setElseSchema(Schema
the else schema
elseSchema
)

Sets the "else" schema.

public void
setEnumeration(List<Object>
a list of values allowed
enumeration
)

Sets the enumerated list of values allowed for objects defined by this Schema.

public void
setExample(Object
an object which is an instance of this Schema
example
)
Deprecated since 4.0. use setExamples(List)

Sets the example property of this Schema instance.

public void
setExamples(List<Object>
a list of example objects which this schema could describe
examples
)

Sets the examples property of this Schema instance.

public void
setExclusiveMaximum(BigDecimal
the value that a numeric object must be less than
exclusiveMaximum
)

Sets the exclusiveMaximum property of this Schema instance to the value given.

public void
setExclusiveMinimum(BigDecimal
the value that a numeric object must be greater than
exclusiveMinimum
)

Sets the exclusiveMinimum property of this Schema instance to the value given.

public void
setExternalDocs(ExternalDocumentation
an additional external documentation object
externalDocs
)

Sets the externalDocs property of this Schema to the indicated value.

public void
setFormat(String
the string specifying the data format
format
)

Sets the format property of this Schema instance to the given string.

public void
setIfSchema(Schema
the if schema
ifSchema
)

Sets the "if" schema.

public void
setItems(Schema
the Schema used by this array
items
)

Set the Schema used for all the elements of an array typed Schema.

public void
setMaxContains(Integer
the max number of items which may be matched by contains
maxContains
)

Sets the maxContains property from this Schema instance.

public void
setMaximum(BigDecimal
the value that a numeric object must be less than or equal to
maximum
)

Sets the maximum property of this Schema instance to the value given.

public void
setMaxItems(Integer
the maximum number of elements in objects defined by this Schema e.g. array elements
maxItems
)

Sets the maxItems property of this Schema instance to the value given.

public void
setMaxLength(Integer
the maximum length of objects defined by this Schema
maxLength
)

Sets the maxLength property of this Schema instance to the value given.

public void
setMaxProperties(Integer
limit the number of properties in objects defined by this Schema
maxProperties
)

Sets the maxProperties property of this Schema instance to the value given.

public void
setMinContains(Integer
the minimum number of items which may be matched by contains
minContains
)

Sets the minContains property from this Schema instance.

public void
setMinimum(BigDecimal
the value that a numeric object must be greater than or equal to
minimum
)

Sets the minimum property of this Schema instance to the value given.

public void
setMinItems(Integer
the minimum number of elements in objects defined by this Schema e.g. array elements
minItems
)

Sets the minItems property of this Schema instance to the value given.

public void
setMinLength(Integer
the minimum length of objects defined by this Schema
minLength
)

Sets the minLength property of this Schema instance to the value given.

public void
setMinProperties(Integer
limit the number of properties in objects defined by this Schema
minProperties
)

Sets the minProperties property of this Schema instance to the value given.

public void
setMultipleOf(BigDecimal
a positive number that restricts the value of objects described by this Schema
multipleOf
)

Sets the multipleOf property of this Schema instance to the value given.

public void
setNot(Schema
the Schema which describes properties not allowed
not
)

Sets the not property to a Schema which describes properties not allowed in objects defined by the current schema.

public void
setOneOf(List<Schema>
the list of schemas used by the oneOf property
oneOf
)

Sets the schemas used by the oneOf property of this Schema.

public void
setPattern(String
the regular expression which restricts objects defined by this Schema
pattern
)

Sets the pattern property of this Schema instance to the string given.

public void
setPatternProperties(Map<String, Schema>
a map of regular expression and schema pairs
patternProperties
)

Sets the patternProperties property from this Schema instance.

public void
setPrefixItems(List<Schema>
a list of prefix item schemas
prefixItems
)

Sets the prefixItems property of this Schema instance.

public void
setProperties(Map<String, Schema>
a map which associates property names with the schemas that describe their contents
properties
)

Sets the properties of this Schema instance to the map provided.

public void
setPropertyNames(Schema
the schema which each property name must validate against
propertyNameSchema
)

Sets the propertyNames property from this Schema instance.

public void
setReadOnly(Boolean
true indicates the Schema should not be sent as part of a request message
readOnly
)

Sets the readOnly property of this Schema.

public void
setRequired(List<String>
the list of fields required in objects defined by this Schema
required
)

Sets the list of fields required in objects defined by this Schema.

public void
setSchemaDialect(String
the schema dialect name, or null for the default
schemaDialect
)

Sets the schema dialect in use.

public void
setThenSchema(Schema
the then schema
thenSchema
)

Sets the "then" schema.

public void
setTitle(String
a title to assign to this Schema
title
)

Sets the title property of this Schema instance to the given string.

public void
setType(List<Schema.SchemaType>
a list of the allowed types
types
)

Sets the type property of this Schema instance.

public void
setUnevaluatedItems(Schema
a schema that unevaluated array items must validate against
unevaluatedItems
)

Sets the unevaluatedItems property of this Schema instance.

public void
setUnevaluatedProperties(Schema
a schema that unevaluated object properties must validate against
unevaluatedProperties
)

Sets the unevaluatedProperties property of this Schema instance.

public void
setUniqueItems(Boolean
ensure the items (e.g. array elements) are unique in objects defined by this Schema
uniqueItems
)

Sets the uniqueItems property of this Schema instance to the value given.

public void
setWriteOnly(Boolean
true indicates the Schema should not be sent as part of a response message
writeOnly
)

Sets the writeOnly property of this Schema.

public void
setXml(XML
a metadata object to describe the XML representation of this property
xml
)

Sets the xml property of this Schema instance.

public default Schema

Returns:

the current Schema instance
thenSchema
(Schema
the then schema
thenSchema
)

Sets the "then" schema.

public default Schema

Returns:

the current Schema instance
title
(String
a title to assign to this Schema
title
)

Sets the title property of this Schema instance to the given string.

public default Schema

Returns:

current Schema instance
type
(List<Schema.SchemaType>
a list of the allowed types
types
)

Sets the type property of this Schema instance.

public default Schema

Returns:

the current Schema instance
unevaluatedItems
(Schema
a schema that unevaluated array items must validate against
unevaluatedItems
)

Sets the unevaluatedItems property of this Schema instance.

public default Schema

Returns:

the current Schema instance
unevaluatedProperties
(Schema
a schema that unevaluated object properties must validate against
unevaluatedProperties
)

Sets the unevaluatedProperties property of this Schema instance.

public default Schema

Returns:

the current Schema instance
uniqueItems
(Boolean
ensure the items (e.g. array elements) are unique in objects defined by this Schema
uniqueItems
)

Sets the uniqueItems property of this Schema instance to the value given.

public default Schema

Returns:

the current Schema instance
writeOnly
(Boolean
true indicates the Schema should not be sent as part of a response message
writeOnly
)

Sets the writeOnly property of this Schema.

public default Schema

Returns:

the current Schema instance
xml
(XML
a metadata object to describe the XML representation of this property
xml
)

Sets the xml property of this Schema instance.

Inherited from org.eclipse.microprofile.openapi.models.Extensible:
addExtensionextensionsgetExtensionsremoveExtensionsetExtensions
Inherited from org.eclipse.microprofile.openapi.models.Reference:
getRefrefsetRef