From 37f5b65dc68886be6eac172f0469015b6968980a Mon Sep 17 00:00:00 2001 From: "Henry H. Andrews" Date: Thu, 25 Apr 2024 13:42:33 -0700 Subject: [PATCH 1/2] Non-string discriminator values (3.1.1) 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.1.1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/3.1.1.md b/versions/3.1.1.md index 3737ffcf3c..2b5a81b7ff 100644 --- a/versions/3.1.1.md +++ b/versions/3.1.1.md @@ -2719,7 +2719,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.x, a response payload MAY be described to be exactly one of any number of types: From c7f4b9b704c4188befaffb5299758fd2a68d4efe Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 26 Apr 2024 10:44:27 +0200 Subject: [PATCH 2/2] Update versions/3.1.1.md --- versions/3.1.1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/3.1.1.md b/versions/3.1.1.md index 2b5a81b7ff..69caeac281 100644 --- a/versions/3.1.1.md +++ b/versions/3.1.1.md @@ -2719,7 +2719,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.x, a response payload MAY be described to be exactly one of any number of types: