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).
@@ -2710,7 +2708,7 @@ components:
2710
2708
]
2711
2709
},
2712
2710
"Cat": {
2713
-
"description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.",
2711
+
"description": "A representation of a cat. Note that `Cat` will be used as the discriminating value.",
2714
2712
"allOf": [
2715
2713
{
2716
2714
"$ref": "#/components/schemas/Pet"
@@ -2737,7 +2735,7 @@ components:
2737
2735
]
2738
2736
},
2739
2737
"Dog": {
2740
-
"description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.",
2738
+
"description": "A representation of a dog. Note that `Dog` will be used as the discriminating value.",
2741
2739
"allOf": [
2742
2740
{
2743
2741
"$ref": "#/components/schemas/Pet"
@@ -2779,7 +2777,7 @@ components:
2779
2777
required:
2780
2778
- name
2781
2779
- petType
2782
-
Cat: # "Cat" will be used as the discriminator value
2780
+
Cat: # "Cat" will be used as the discriminating value
2783
2781
description: A representation of a cat
2784
2782
allOf:
2785
2783
- $ref: '#/components/schemas/Pet'
@@ -2795,7 +2793,7 @@ components:
2795
2793
- aggressive
2796
2794
required:
2797
2795
- huntingSkill
2798
-
Dog: # "Dog" will be used as the discriminator value
2796
+
Dog: # "Dog" will be used as the discriminating value
2799
2797
description: A representation of a dog
2800
2798
allOf:
2801
2799
- $ref: '#/components/schemas/Pet'
@@ -2933,7 +2931,7 @@ The Discriminator Object does this by implicitly or explicitly associating the p
2933
2931
##### Fixed Fields
2934
2932
Field Name | Type | Description
2935
2933
---|:---:|---
2936
-
<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.
2934
+
<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.
2937
2935
<a name="discriminatorMapping"></a> mapping | Map[`string`, `string`] | An object to hold mappings between payload values and schema names or URI references.
2938
2936
2939
2937
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.
3009
+
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.
3012
3010
3013
3011
When used in conjunction with the `anyOf` construct, the use of the discriminator can avoid ambiguity for serializers/deserializers where multiple schemas may satisfy a single payload.
0 commit comments