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
Copy file name to clipboardExpand all lines: src/oas.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1148,7 +1148,10 @@ For simpler scenarios, a [`schema`](#parameter-schema) and [`style`](#parameter-
1148
1148
1149
1149
These fields MUST NOT be used with `in: "querystring"`.
1150
1150
1151
-
When serializing `in: "header"` or `in: "cookie", style: "cookie"` parameters with `schema`, URI percent-encoding MUST NOT be applied, and when parsing any apparent percent-encoding MUST NOT be decoded; if using an RFC6570 implementation that automatically performs these steps, the steps MUST be reversed before use.
1151
+
Care is needed for parameters with `schema` that have `in: "header"` or `in: "cookie", style: "cookie"`:
1152
+
* When serializing these values, URI percent-encoding MUST NOT be applied.
1153
+
* When parsing these parameters, any apparent percent-encoding MUST NOT be decoded.
1154
+
* If using an RFC6570 implementation that automatically performs encoding or decoding steps, the steps MUST be undone before use.
1152
1155
In these cases, implementations MUST pass values through unchanged rather than attempting to quote or escape them, as the quoting rules for headers and escaping conventions for cookies vary too widely to be performed automatically; see [Appendix D](#appendix-d-serializing-headers-and-cookies) for guidance on quoting and escaping.
1153
1156
1154
1157
| Field Name | Type | Description |
@@ -1212,8 +1215,8 @@ In some cases, such as inserting `/` into path parameter values, doing so is [ex
1212
1215
See also:
1213
1216
1214
1217
* [Appendix C](#appendix-c-using-rfc6570-based-serialization) for guidance on using or simulating RFC6570 implementations.
1215
-
* [Appendix D](#appendix-d-serializing-headers-and-cookies) for guidance on percent-encoding and cookies, as well as other escaping approaches for headers and cookies
1216
-
* [Appendix E](#appendix-e-percent-encoding-and-form-media-types) for a thorough discussion of percent-encoding options, compatibility, and handling OAS-defined delimiters that are not allowed by RFC3986
1218
+
* [Appendix D](#appendix-d-serializing-headers-and-cookies) for guidance on percent-encoding and cookies, as well as other escaping approaches for headers and cookies.
1219
+
* [Appendix E](#appendix-e-percent-encoding-and-form-media-types) for a thorough discussion of percent-encoding options, compatibility, and handling OAS-defined delimiters that are not allowed by RFC3986.
A cookie parameter relying on the percent-encodingn behavior of the default `style: "form"`:
1336
+
A cookie parameter relying on the percent-encoding behavior of the default `style: "form"`:
1334
1337
1335
1338
```yaml
1336
1339
name: greeting
@@ -5186,7 +5189,7 @@ The behavior of `style: "cookie"` assumes this usage, and _does not_ apply or re
5186
5189
If automatic percent-encoding is desired, `style: "form"` with a primitive value or with the non-default `explode` value of `false` provides this behavior.
5187
5190
However, note that the default value of `explode: true` for `style: "form"` with non-primitive values uses the wrong delimiter for cookies (`&` instead of `;` followed by a single space) to set multiple cookie values.
5188
5191
Using `style: "form"` with `in: "cookie"` via an RFC6570 implementation requires stripping the `?` prefix, as when producing `application/x-www-form-urlencoded` message bodies.
5189
-
To allow the full use of `style: "form"` with `in: "cookie"`, the `allowReserved` field is now supported for cookies.
5192
+
To allow the full use of `style: "form"` with `in: "cookie"`, use the `allowReserved` field.
5190
5193
5191
5194
## Appendix E: Percent-Encoding and Form Media Types
0 commit comments