Skip to content

Commit be16865

Browse files
committed
Add links, remove confusing sentence
1 parent c0be5ec commit be16865

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

versions/3.1.1.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2788,15 +2788,12 @@ The OpenAPI Specification allows combining and extending model definitions using
27882788
`allOf` takes an array of object definitions that are validated *independently* but together compose a single object.
27892789

27902790
While composition offers model extensibility, it does not imply a hierarchy between the models.
2791-
To support polymorphism, the OpenAPI Specification adds the `discriminator` field.
2791+
To support polymorphism, the OpenAPI Specification adds the [`discriminator`](#schemaDiscriminator) field.
27922792
When used, the `discriminator` indicates the name of the property that hints which schema definition is expected to validate the structure of the model.
2793-
<!-- 3.0.4 contains the following text: does it also apply to 3.1.1?
27942793
As such, the `discriminator` field MUST be a required field.
27952794
There are two ways to define the value of a discriminator for an inheriting instance.
27962795
- Use the schema name.
2797-
- Override the schema name by overriding the property with a new value. If a new value exists, this takes precedence over the schema name.
2798-
As such, inline schema definitions, which do not have a given id, *cannot* be used in polymorphism.
2799-
-->
2796+
- [Override the schema name](#discriminatorMapping) by overriding the property with a new value. If a new value exists, this takes precedence over the schema name.
28002797

28012798
###### Generic (Template) Data Structures
28022799

0 commit comments

Comments
 (0)