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
The "?" is not part of individual parameter serializations
We say that the example table is "as would be shown with the
`example` or `examples` keywords", but then we include the `?`
which is not correct for a single parameter with `in: query`.
Even with `in: querystring`, it would not be correct because the
parameter describes the `application/x-www-form-urlencoded` document,
which does not include the `?` delimiter.
Copy file name to clipboardExpand all lines: src/oas.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1218,7 +1218,7 @@ The following table shows examples, as would be shown with the `example` or `exa
1218
1218
* The behavior of combinations marked _n/a_ is undefined
1219
1219
* The `undefined` column replaces the `empty` column in previous versions of this specification in order to better align with [RFC6570](https://www.rfc-editor.org/rfc/rfc6570.html#section-2.3) terminology, which describes certain values including but not limited to `null` as "undefined" values with special handling; notably, the empty string is _not_ undefined
1220
1220
* For `form` and the non-RFC6570 query string styles `spaceDelimited`, `pipeDelimited`, and `deepObject`, each example is shown prefixed with `?` as if it were the only query parameter; see [Appendix C](#appendix-c-using-rfc6570-based-serialization) for more information on constructing query strings from multiple parameters, and [Appendix D](#appendix-d-serializing-headers-and-cookies) for warnings regarding `form` and cookie parameters
1221
-
* Note that the `?` prefix is not appropriate for serializing `application/x-www-form-urlencoded` HTTP message bodies, and MUST be stripped or (if constructing the string manually) not added when used in that context; see the [Encoding Object](#encoding-object) for more information
1221
+
* Note that the `?` prefix is not included in the serialization of each parameter, as it is not a part of any single `in: "query"` parameter, but rather a part of the generic URI syntax. When using these fields in the [Encoding Object](#encoding-object) to serialized `application/x-www-form-urlencoded` HTTP message content, the `?` MUST NOT be included.
1222
1222
* The examples are percent-encoded as required by RFC6570 and RFC3986; see [Appendix E](#appendix-e-percent-encoding-and-form-media-types) for a thorough discussion of percent-encoding concerns, including why unencoded `|` (`%7C`), `[` (`%5B`), and `]` (`%5D`) seem to work in some environments despite not being compliant.
0 commit comments