You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versions/3.1.1.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2332,7 +2332,8 @@ The OpenAPI Specification's base vocabulary is comprised of the following keywor
2332
2332
2333
2333
Field Name | Type | Description
2334
2334
---|:---:|---
2335
-
<a name="schemaDiscriminator"></a>discriminator | [Discriminator Object](#discriminatorObject) | Adds 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](#schemaComposition) for more details.
Object](#discriminatorObject) | Adds support for polymorphism. The discriminator is used to determine which of a set of schemas a payload is expected to satisfy. See [Composition and Inheritance](#schemaComposition) for more details.
2336
2337
<a name="schemaXml"></a>xml | [XML Object](#xmlObject) | This 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.
2337
2338
<a name="schemaExternalDocs"></a>externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this schema.
2338
2339
<a name="schemaExample"></a>example | Any | A 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.<br><br>**Deprecated:** 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.
@@ -2346,8 +2347,8 @@ The OpenAPI Specification allows combining and extending model definitions using
2346
2347
2347
2348
While composition offers model extensibility, it does not imply a hierarchy between the models.
2348
2349
To support polymorphism, the OpenAPI Specification adds the `discriminator` field.
2349
-
When used, the `discriminator` will be the name of the property that decides which schema definition validates the structure of the model.
2350
-
As such, the `discriminator` field MUST be a required field.
2350
+
When used, the `discriminator` will indicate the name of the property that decides which schema definition validates the structure of the model.
2351
+
As such, that property MUST be a required field.
2351
2352
There are two ways to define the value of a discriminator for an inheriting instance.
2352
2353
- Use the schema name.
2353
2354
- Override the schema name by overriding the property with a new value. If a new value exists, this takes precedence over the schema name.
0 commit comments