From bcf757deed7ff6c46c8f5808a903d616d1ba1ac8 Mon Sep 17 00:00:00 2001 From: "Henry H. Andrews" Date: Thu, 25 Apr 2024 13:44:00 -0700 Subject: [PATCH 1/2] Non-string discriminator values (3.2.0) The "undefined" wording was chosen to allow implementations that make a good-faith effort to accommodate non-string values to remain compliant. However, new implementations are not expected to implement any sort of type coersion, and this guides API designers away from that expectation. --- versions/3.2.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/3.2.0.md b/versions/3.2.0.md index 60795d106b..7923e539b3 100644 --- a/versions/3.2.0.md +++ b/versions/3.2.0.md @@ -2707,7 +2707,7 @@ Field Name | Type | Description This object MAY be extended with [Specification Extensions](#specificationExtensions). -The discriminator object is legal only when using one of the composite keywords `oneOf`, `anyOf`, `allOf`. +The discriminator object is legal only when using one of the composite keywords `oneOf`, `anyOf`, `allOf`. Note that because the discrinating property's value is used as a component name and/or as the key in the `mapping` object, the behavior of any value that is not a string is undefined. In OAS 3.0, a response payload MAY be described to be exactly one of any number of types: From 6ce4b372bdf2d3b23759d2041fecb78c423a762e Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 26 Apr 2024 10:45:26 +0200 Subject: [PATCH 2/2] Update versions/3.2.0.md --- versions/3.2.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/3.2.0.md b/versions/3.2.0.md index 7923e539b3..c86d73d712 100644 --- a/versions/3.2.0.md +++ b/versions/3.2.0.md @@ -2707,7 +2707,7 @@ Field Name | Type | Description This object MAY be extended with [Specification Extensions](#specificationExtensions). -The discriminator object is legal only when using one of the composite keywords `oneOf`, `anyOf`, `allOf`. Note that because the discrinating property's value is used as a component name and/or as the key in the `mapping` object, the behavior of any value that is not a string is undefined. +The discriminator object is legal only when using one of the composite keywords `oneOf`, `anyOf`, `allOf`. Note that because the discriminating property's value is used as a component name and/or as the key in the `mapping` object, the behavior of any value that is not a string is undefined. In OAS 3.0, a response payload MAY be described to be exactly one of any number of types: