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
I found the "discriminator value" language confusing, because
`discriminator` is the field name, and in most cases the value
of a field is the value in the OpenAPI Description.
Reviewers did not like "discriminator property value", but
"discriminating value" makes it clear that this is about the
value that actually causes schema selection, and not about
the value of the discriminator keyword.
Also removed placeholder in favor of just having the headings,
as has been done in several other PRs that overlap with
new section PRs for internal linking.
Data types in the OAS are based on the types supported by the [JSON Schema Specification Draft 2020-12](https://tools.ietf.org/html/draft-bhutton-json-schema-00#section-4.2.1).
@@ -2675,7 +2673,7 @@ components:
2675
2673
]
2676
2674
},
2677
2675
"Cat": {
2678
-
"description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
2676
+
"description": "A representation of a cat. Note that `Cat` will be used as the discriminating value.",
2679
2677
"allOf": [
2680
2678
{
2681
2679
"$ref": "#/components/schemas/Pet"
@@ -2702,7 +2700,7 @@ components:
2702
2700
]
2703
2701
},
2704
2702
"Dog": {
2705
-
"description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
2703
+
"description": "A representation of a dog. Note that `Dog` will be used as the discriminating value.",
2706
2704
"allOf": [
2707
2705
{
2708
2706
"$ref": "#/components/schemas/Pet"
@@ -2744,7 +2742,7 @@ components:
2744
2742
required:
2745
2743
- name
2746
2744
- petType
2747
-
Cat: # "Cat" will be used as the discriminator value
2745
+
Cat: # "Cat" will be used as the discriminating value
2748
2746
description: A representation of a cat
2749
2747
allOf:
2750
2748
- $ref: '#/components/schemas/Pet'
@@ -2760,7 +2758,7 @@ components:
2760
2758
- aggressive
2761
2759
required:
2762
2760
- huntingSkill
2763
-
Dog: # "Dog" will be used as the discriminator value
2761
+
Dog: # "Dog" will be used as the discriminating value
2764
2762
description: A representation of a dog
2765
2763
allOf:
2766
2764
- $ref: '#/components/schemas/Pet'
@@ -2898,7 +2896,7 @@ The Discriminator Object does this by implicitly or explicitly associating the p
2898
2896
##### Fixed Fields
2899
2897
Field Name | Type | Description
2900
2898
---|:---:|---
2901
-
<a name="propertyName"></a>propertyName | `string` | **REQUIRED**. The name of the property in the payload that will hold the discriminator value. This property SHOULD be required in the payload schema, as the behavior when the property is absent is undefined.
2899
+
<a name="propertyName"></a>propertyName | `string` | **REQUIRED**. The name of the property in the payload that will hold the discriminating value. This property SHOULD be required in the payload schema, as the behavior when the property is absent is undefined.
2902
2900
<a name="discriminatorMapping"></a> mapping | Map[`string`, `string`] | An object to hold mappings between payload values and schema names or URI references.
2903
2901
2904
2902
This object MAY be extended with [Specification Extensions](#specificationExtensions).
Here the discriminator property _value_ of `dog` will map to the schema `#/components/schemas/Dog`, rather than the default (implicit) value of `#/components/schemas/dog`. If the discriminator property _value_ does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail.
2975
+
Here the discriminating value of `dog` will map to the schema `#/components/schemas/Dog`, rather than the default (implicit) value of `#/components/schemas/dog`. If the discriminating value does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail.
2978
2976
2979
2977
When used in conjunction with the `anyOf` construct, the use of the discriminator can avoid ambiguity where multiple schemas may satisfy a single payload.
0 commit comments