Optional $commentOptional $defsOptional $idOptional $refOptional $schemaOptional additionalOptional additionalOptional allOptional anyOptional constOptional containsOptional contentOptional contentOptional defaultOptional definitionsOptional dependenciesOptional descriptionCommonMark syntax MAY be used for rich text representation.
Optional discriminatorAdds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See Composition and Inheritance for more details.
Optional elseOptional enumOptional exampleA free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary.
The example property has been deprecated in favor of the JSON
Schema examples keyword. Use of example is discouraged, and later
versions of this specification may remove it.
Optional examplesOptional exclusiveOptional exclusiveOptional externalAdditional external documentation for this schema.
Optional formatOptional ifOptional itemsOptional maxOptional maxOptional maxOptional maximumOptional minOptional minOptional minOptional minimumOptional multipleOptional notOptional oneOptional patternOptional patternOptional propertiesOptional propertyOptional readOptional requiredOptional thenOptional titleOptional typeOptional uniqueOptional writeOptional xmlThis MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.
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 those of JSON Schema and do not add any additional semantics. Where JSON Schema indicates that behavior is defined by the application (e.g. for annotations), OAS also defers the definition of semantics to the application consuming the OpenAPI document.
See
https://spec.openapis.org/oas/latest.html#schema-object