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.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Schema.
The values allowed for the |
| Modifier and Type | Method and Description |
|---|---|
| public Schema | |
| public Schema | |
| public Schema | Returns: the current Schema instancethe property name propertyName, List<String> the names of additional properties which are required if additionalRequiredPropertyNames)propertyName exists to addSets the list of additional property names that are required if a property named |
| public Schema | Returns: the current Schema instancethe property name propertyName, Schema the dependent schema schema)Sets the dependent schema for a property name. |
| public Schema | Returns: current Schema instancean 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 instancethe example to add to the examples list example)Adds an example to the examples list. |
| public default Schema | Returns: the current Schema instancea 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 instancea Schema which defines additional properties additionalProperties)Sets the Schema which defines additional properties not defined by "properties" or "patternProperties". |
| public Schema | |
| public Schema | Returns: the current Schema instancethe regular expression to add regularExpression, Schema the schema that a property value must validate against if its name matches schema)regularExpressionAdds a regular expression and schema pair to the list of pattern properties. |
| public Schema | Returns: current Schema instancethe schema to add to the prefixItems list prefixItem)Adds a schema to the end of the prefixItems list. |
| public Schema | Returns: the current Schema instancethe 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 instancethe 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 instancethe type to add to the type list typeAdds a type to the type list. |
| public default Schema | |
| public default Schema | |
| public default Schema | Returns: the current Schema instancethe boolean value of this schema, or booleanSchema)null if it is not a boolean schemaSets this schema to a boolean value. |
| public default Schema | |
| public default Schema | Returns: the current Schema instancethe value that the object must have constValue)Sets the const property from this Schema instance. |
| public default Schema | |
| public default Schema | Returns: the current Schema instancethe encoding type contentEncoding)Sets the contentEncoding property from this Schema instance. |
| public default Schema | Returns: the current Schema instancethe media type contentMediaType)Sets the contentMediaType property from this Schema instance. |
| public default Schema | Returns: the current Schema instancethe schema for the data within the string contentSchema)Sets the contentSchema property from this Schema instance. |
| public default Schema | Returns: the current Schema instancea 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 instancea 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 instancea map of properties and their dependent schemas dependentSchemas)Sets the dependentSchemas property of this Schema instance. |
| public default Schema | Returns: the current Schema instancetrue to indicate this Schema is deprecated deprecated)Sets the deprecated property of this Schema. |
| public default Schema | Returns: the current Schema instancea 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 instancethe 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 instancethe else schema elseSchema)Sets the "else" schema. |
| public default Schema | |
| public default Schema | Returns: the current Schema instancean 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 | |
| public default Schema | Returns: the current Schema instancethe 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 instancethe 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 instancean additional external documentation object externalDocs)Sets the externalDocs property of this Schema to the indicated value. |
| public default Schema | |
| public Object | |
| public Boolean | Returns: this Schema's additionalProperties property (asBoolean)
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 (asSchema)Returns the value of the "additionalProperties" setting, which indicates whether properties not otherwise defined are allowed. |
| public Map | Returns: aMap of property names to their corresponding valuesGets all properties of a schema. |
| public List | Returns: a copy List (potentially immutable) of schemas used by the allOf propertyReturns the schemas used by the allOf property. |
| public List | Returns: a copy List (potentially immutable) of schemas used by the anyOf propertyReturns the schemas used by the anyOf property. |
| public Boolean | Returns: the boolean value of this schema, ornull if it is not a boolean schemaReturns whether this Schema is a boolean schema. |
| public String | Returns: the comment, ornull if no comment is setReturns the comment to be included in the |
| public Object | Returns: the value that the object must haveReturns the const property from this Schema instance. |
| public Schema | Returns: a schema that one item in the array should matchReturns the contains property of this Schema instance. |
| public String | Returns: the encoding typeReturns the contentEncoding property from this Schema instance. |
| public String | Returns: the media typeReturns the contentMediaType property from this Schema instance. |
| public Schema | Returns: the schema for the data within the stringReturns the contentSchema property from this Schema instance. |
| public Object | Returns: the default value objectReturns the default value property from this Schema instance. |
| public Map | Returns: a copy Map (potentially immutable) of property names to lists of additional required property namesReturns the dependentRequired property of this Schema instance. |
| public Map | Returns: a copy Map (potentially immutable) of properties and their dependent schemasReturns the dependentSchemas property of this Schema instance. |
| public Boolean | Returns: indication that the Schema is deprecated and should be transitioned out of usageReturns the deprecated property from this Schema instance. |
| public String | Returns: a string containing a descriptionReturns 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 descriptionReturns the discriminator property from this Schema instance. |
| public Schema | |
| public List | Returns: a copy List (potentially immutable) of values allowed for objects defined by this SchemaReturns 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
Deprecated
since 4.0. use
getExamples()
Returns the example property from this Schema instance. |
| public List | Returns: a copy List (potentially immutable) of example objects which this schema could describeReturns the examples property of this Schema instance. |
| public BigDecimal | Returns: the value that a numeric object must be less thanReturns the exclusiveMaximum property from this Schema instance. |
| public BigDecimal | Returns: the value that a numeric object must be greater thanReturns the exclusiveMinimum property from this Schema instance. |
| public ExternalDocumentation | Returns: additional external documentation for this SchemaReturns the externalDocs property from this Schema instance. |
| public String | Returns: a string describing the format of the data in this SchemaReturns the format property from this Schema instance. |
| public Schema | |
| public Schema | Returns: the Schema used for all the elementsReturns the Schema used for all the elements of an array typed Schema. |
| public Integer | Returns: the max number of items which may be matched bycontainsReturns the maxContains property from this Schema instance. |
| public BigDecimal | Returns: the value that a numeric object must be less than or equal toReturns the maximum property from this Schema instance. |
| public Integer | Returns: the maximum number of elements in the object e.g. array elementsReturns the maxItems property from this Schema instance. |
| public Integer | Returns: the maximum length of objects e.g. stringsReturns the maxLength property from this Schema instance. |
| public Integer | Returns: the maximum number of properties allowed in the objectReturns the maxProperties property from this Schema instance. |
| public Integer | Returns: the minimum number of items which may be matched bycontainsReturns the minContains property from this Schema instance. |
| public BigDecimal | Returns: the value that a numeric object must be greater than or equal toReturns the minimum property from this Schema instance. |
| public Integer | Returns: the minimum number of elements in the object e.g. array elementsReturns the minItems property from this Schema instance. |
| public Integer | Returns: the minimum length of objects e.g. stringsReturns the minLength property from this Schema instance. |
| public Integer | Returns: the minimum number of properties allowed in the objectReturns the minProperties property from this Schema instance. |
| public BigDecimal | Returns: the positive number that restricts the value of the objectReturns the multipleOf property from this Schema instance. |
| public Schema | Returns: the not property's schemaReturns a Schema which describes properties not allowed in objects defined by the current schema. |
| public List | Returns: a copy List (potentially immutable) of schemas used by the oneOf propertyReturns the schemas used by the oneOf property. |
| public String | Returns: the regular expression which restricts the value of an object e.g. a stringReturns the pattern property from this Schema instance. |
| public Map | Returns: a copy Map (potentially immutable) of regular expression and schema pairsReturns the patternProperties property from this Schema instance. |
| public List | Returns: a copy List (potentially immutable) of prefix item schemasReturns the prefixItems property of this Schema instance. |
| public Map | Returns: a copy Map (potentially immutable) which associates property names with the schemas that describe their contentsReturns the properties defined in this Schema. |
| public Schema | Returns: the schema which each property name must validate againstReturns the propertyNames property from this Schema instance. |
| public Boolean | Returns: indication that the Schema is only valid in a response messageReturns the readOnly property from this Schema instance. |
| public List | Returns: a copy List (potentially immutable) of fields required in objects defined by this SchemaReturns the required property from this Schema instance. |
| public String | Returns: the schema dialect name, ornull for the defaultReturns the schema dialect in use. |
| public Schema | |
| public String | Returns: the title assigned to this SchemaReturns the title property from this Schema instance. |
| public List | Returns: a copy List (potentially immutable) of the allowed typesReturns the type property of this Schema instance. |
| public Schema | Returns: a schema that unevaluated array items must validate againstReturns the unevaluatedItems property of this Schema instance. |
| public Schema | Returns: a schema that unevaluated object properties must validate againstReturns the unevaluatedProperties property of this Schema instance. |
| public Boolean | Returns: whether to ensure items are uniqueReturns the uniqueItems property from this Schema instance. |
| public Boolean | Returns: indication that the Schema is only valid in a request messageReturns the writeOnly property from this Schema instance. |
| public XML | Returns: a metadata object that allows for more fine-tuned XML model definitionsReturns the xml property from this Schema instance. |
| public default Schema | |
| public default Schema | |
| public default Schema | Returns: the current Schema instancethe maximum number of items which may be matched by maxContains)containsSets the maxContains property from this Schema instance. |
| public default Schema | Returns: the current Schema instancethe 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 | |
| public default Schema | |
| public default Schema | Returns: the current Schema instancelimit 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 instancethe minimum number of items which may be matched by minContains)containsSets the minContains property from this Schema instance. |
| public default Schema | Returns: the current Schema instancethe 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 | |
| public default Schema | |
| public default Schema | Returns: the current Schema instancelimit 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 instancea 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 | |
| public default Schema | |
| public default Schema | |
| public default Schema | Returns: the current Schema instancea map of regular expression and schema pairs patternProperties)Sets the patternProperties property from this Schema instance. |
| public default Schema | Returns: current Schema instancea list of prefix item schemas prefixItems)Sets the prefixItems property of this Schema instance. |
| public default Schema | Returns: the current Schema instancea 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 instancethe schema which each property name must validate against propertyNameSchema)Sets the propertyNames property from this Schema instance. |
| public default 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 |
| 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.
the type to remove from the type list typeRemoves a type from the type list. |
| public default Schema | |
| public default Schema | Returns: the current Schema instancethe schema dialect name, or schemaDialect)null for the defaultSets the schema dialect in use. |
| public Schema | |
| 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
allProperties)set(String, Object)Sets all properties of a schema. |
| public void | |
| public void | |
| public void | setBooleanSchema(Boolean
the boolean value of this schema, or booleanSchema)null if it is not a boolean schemaSets this schema to a boolean value. |
| public void | setComment(String
the comment, or comment)null to remove any commentSets the comment to be included in the |
| 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 | |
| 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 | |
| public void | |
| public void | |
| public void | setMaxContains(Integer
the max number of items which may be matched by maxContains)containsSets 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 minContains)containsSets 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 | |
| public void | |
| 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 messageSets 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 schemaDialect)null for the defaultSets the schema dialect in use. |
| public void | |
| public void | |
| public void | setType(List<Schema.
a list of the allowed types typesSets 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 messageSets the writeOnly property of this Schema. |
| public void | |
| public default Schema | Returns: the current Schema instancethe then schema thenSchema)Sets the "then" schema. |
| public default Schema | |
| public default Schema | Returns: current Schema instancea list of the allowed types typesSets the type property of this Schema instance. |
| public default Schema | Returns: the current Schema instancea schema that unevaluated array items must validate against unevaluatedItems)Sets the unevaluatedItems property of this Schema instance. |
| public default Schema | Returns: the current Schema instancea schema that unevaluated object properties must validate against unevaluatedProperties)Sets the unevaluatedProperties property of this Schema instance. |
| public default Schema | Returns: the current Schema instanceensure 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 | |
| public default Schema |