@Target(value={FIELD,METHOD,PARAMETER,TYPE})
 @Retention(value=RUNTIME)
 @Inherited
public @interface Schema
| Modifier and Type | Optional Element and Description | 
|---|---|
| java.lang.Class<?>[] | allOfProvides an array of java class implementations which can be used to describe multiple acceptable schemas. | 
| java.lang.Class<?>[] | anyOfProvides an array of java class implementations which can be used to describe multiple acceptable schemas. | 
| java.lang.String | defaultValueProvides a default value. | 
| boolean | deprecatedSpecifies that a schema is deprecated and SHOULD be transitioned out of usage. | 
| java.lang.String | descriptionA description of the schema. | 
| DiscriminatorMapping[] | discriminatorMappingAn array of discriminator mappings. | 
| java.lang.String | discriminatorPropertyProvides a discriminator property value. | 
| java.lang.String[] | enumerationProvides a list of enum values. | 
| java.lang.String | exampleA free-form property to include an example of an instance for this schema. | 
| boolean | exclusiveMaximumIf true, makes the maximum value exclusive, or a less-than criteria. | 
| boolean | exclusiveMinimumIf true, makes the minimum value exclusive, or a greater-than criteria. | 
| ExternalDocumentation | externalDocsAdditional external documentation for this schema. | 
| java.lang.String | formatProvides an optional override for the format. | 
| boolean | hiddenAllows schema to be marked as hidden. | 
| java.lang.Class<?> | implementationProvides a java class as implementation for this schema. | 
| java.lang.String | maximumSets the maximum numeric value for a property. | 
| int | maxItemsOnly applicable if type=array. | 
| int | maxLengthSets the maximum length of a string value. | 
| int | maxPropertiesConstrains the number of arbitrary properties when additionalProperties is defined. | 
| java.lang.String | minimumSets the minimum numeric value for a property. | 
| int | minItemsOnly applicable if type=array. | 
| int | minLengthSets the minimum length of a string value. | 
| int | minPropertiesConstrains the number of arbitrary properties when additionalProperties is defined. | 
| double | multipleOfConstrains a value such that when divided by the multipleOf, the remainder must be an integer. | 
| java.lang.String | nameThe name of the schema or property. | 
| java.lang.Class<?> | notProvides a java class to be used to disallow matching properties. | 
| boolean | nullableAllows sending a null value for the defined schema. | 
| java.lang.Class<?>[] | oneOfProvides an array of java class implementations which can be used to describe multiple acceptable schemas. | 
| java.lang.String | patternA pattern that the value must satisfy. | 
| SchemaProperty[] | propertiesProvides a list of properties present in this schema. | 
| boolean | readOnlyRelevant only for Schema "properties" definitions. | 
| java.lang.String | refReference value to a Schema definition. | 
| boolean | requiredMandates whether the annotated item is required or not. | 
| java.lang.String[] | requiredPropertiesAllows multiple properties in an object to be marked as required. | 
| java.lang.String | titleA title to explain the purpose of the schema. | 
| SchemaType | typeProvides an override for the basic type of the schema. | 
| boolean | uniqueItemsOnly applicable if type=array. | 
| boolean | writeOnlyRelevant only for Schema "properties" definitions. | 
public abstract java.lang.Class<?> implementation
public abstract java.lang.Class<?> not
public abstract java.lang.Class<?>[] oneOf
Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
public abstract java.lang.Class<?>[] anyOf
Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
public abstract java.lang.Class<?>[] allOf
Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
public abstract java.lang.String name
 The name is REQUIRED when the schema is defined within
 Components. The name will be used as the key to add this
 schema to the 'schemas' map for reuse.
 
public abstract java.lang.String title
public abstract double multipleOf
public abstract java.lang.String maximum
public abstract boolean exclusiveMaximum
public abstract java.lang.String minimum
public abstract boolean exclusiveMinimum
public abstract int maxLength
public abstract int minLength
public abstract java.lang.String pattern
public abstract int maxProperties
public abstract int minProperties
public abstract java.lang.String[] requiredProperties
public abstract boolean required
public abstract java.lang.String description
public abstract java.lang.String format
If a consumer is unaware of the meaning of the format, they shall fall back to using the basic type without format. For example, if \"type: integer, format: int128\" were used to designate a very large integer, most consumers will not understand how to handle it, and fall back to simply \"type: integer\"
public abstract java.lang.String ref
This property provides a reference to an object defined elsewhere. This property and all other properties are mutually exclusive. If other properties are defined in addition to the ref property then the result is undefined.
public abstract boolean nullable
public abstract boolean readOnly
If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only. A property MUST NOT be marked as both readOnly and writeOnly being true.
public abstract boolean writeOnly
If the property is marked as writeOnly being true and is in the required list, the required will take effect on the request only. A property MUST NOT be marked as both readOnly and writeOnly being true.
public abstract java.lang.String example
To represent examples that cannot be naturally represented in JSON or YAML, a string value is used to contain the example with escaping where necessary.
When associated with a specific media type, the example string shall be parsed by the consumer to be treated as an object or an array.public abstract ExternalDocumentation externalDocs
public abstract boolean deprecated
public abstract SchemaType type
Value MUST be a string. Multiple types via an array are not supported.
MUST be a valid type per the OpenAPI Specification.public abstract java.lang.String[] enumeration
public abstract java.lang.String defaultValue
Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level.
For example, if type is string, then default can be "foo" but cannot be 1.public abstract java.lang.String discriminatorProperty
The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description.
public abstract DiscriminatorMapping[] discriminatorMapping
public abstract boolean hidden
public abstract int maxItems
An array instance is valid against "maxItems" if its size is less than, or equal to, the value of this keyword.
Ignored if value is Integer.MIN_VALUE.public abstract int minItems
An array instance is valid against "minItems" if its size is greater than, or equal to, the value of this keyword.
Ignored if value is Integer.MAX_VALUE.public abstract boolean uniqueItems
If false, the instance validates successfully. If true, the instance validates successfully if all of its elements are unique.
public abstract SchemaProperty[] properties
implementation is also specified, the final set of properties used by the annotation
 scanner will include properties from both this list and those found from introspection of the implementation
 class, if any.
 
 In the case where properties are specified here in addition to an implementation, the
 attributes given for a property using a SchemaProperty will override the same attributes scanned (or
 derived) from the implementation class.
 
Example:
  @Schema(properties = {
    @SchemaProperty(name = "creditCard", example = "4567100043210001"),
    @SchemaProperty(name = "departureFlight", description = "The departure flight information."),
    @SchemaProperty(name = "returningFlight")
})