From 383f455064eb9fa22c459bfaccd00cd2c426fc35 Mon Sep 17 00:00:00 2001 From: "Henry H. Andrews" Date: Wed, 5 Jun 2024 11:19:01 -0700 Subject: [PATCH] Reword default handling (review feedback) Thanks to @notEthan for the comments! --- versions/3.0.4.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/versions/3.0.4.md b/versions/3.0.4.md index 149d805f3e..fc4a7164be 100644 --- a/versions/3.0.4.md +++ b/versions/3.0.4.md @@ -1649,8 +1649,15 @@ If `format: byte` is used along with setting a different `Content-Transfer-Encod ###### Encoding the `application/x-www-form-urlencoded` Media Type The role of `contentType` with `application/x-www-form-urlencoded` request bodies was not described in detail in version 3.0.3 and earlier of this specification. -To match the intent of these fields and be compatible with version 3.1 of this specification, it is RECOMMENDED that whenever any of `style`, `explode`, or `allowReserved` are present with an explicit values, that the value of `contentType`, whether it is explicitly defined or has the default value, be ignored. -Likewise, if all three of those fields are absent, it is RECOMMENDED that they be ignored, and that encoding be based on `contentType` alone. +To match the intent of these fields and be compatible with version 3.1 of this specification, it is RECOMMENDED that whenever any of `style`, `explode`, or `allowReserved` are present with an explicit value: + +* The value of `contentType`, whether it is explicitly defined or has the default value, is to be ignored +* If any of `style`, `explode`, or `allowReserved` are _not_ present with explicit values, then they are to be treated as if they were present with their default values + +However, if all three of `style`, `explode`, and `allowReserved` fields are absent, it is RECOMMENDED that: + +* All three keywords are to be entirely ignored, rather than treated as having their default values +* Encoding is to be based on `contentType` alone, whether it is present with an explicit value or absent and treated as having its default value This makes the presence of at least one of `style`, `explode`, or `allowReserved` with an explicit value equivalent to using `schema` with `in: query` Parameter Objects, and their absence the equivalent of using `content`, but with the media type specified in `contentType` rather than through a Media Type Object.