Skip to content

Commit d62df60

Browse files
handrewslornajanebaywet
authored
Apply suggestions from code review
Co-authored-by: Lorna Jane Mitchell <[email protected]> Co-authored-by: Vincent Biret <[email protected]>
1 parent b78f66a commit d62df60

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/oas.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,10 @@ For simpler scenarios, a [`schema`](#parameter-schema) and [`style`](#parameter-
11481148

11491149
These fields MUST NOT be used with `in: "querystring"`.
11501150
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.
11521155
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.
11531156

11541157
| Field Name | Type | Description |
@@ -1212,8 +1215,8 @@ In some cases, such as inserting `/` into path parameter values, doing so is [ex
12121215
See also:
12131216

12141217
* [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.
12171220

12181221
##### Serialization and Examples
12191222

@@ -1330,7 +1333,7 @@ examples:
13301333
serializedValue: "greeting=Hello%2C world!; code: 42"
13311334
```
13321335
1333-
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"`:
13341337

13351338
```yaml
13361339
name: greeting
@@ -5186,7 +5189,7 @@ The behavior of `style: "cookie"` assumes this usage, and _does not_ apply or re
51865189
If automatic percent-encoding is desired, `style: "form"` with a primitive value or with the non-default `explode` value of `false` provides this behavior.
51875190
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.
51885191
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.
51905193

51915194
## Appendix E: Percent-Encoding and Form Media Types
51925195

0 commit comments

Comments
 (0)