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
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ The fourth repeats `application/geo+json`-structured values, while the last repe
108
108
109
109
Implementations MUST support mapping sequential media types into the JSON Schema data model by treating them as if the values were in an array in the same order.
110
110
111
-
See [Complete vs Streaming Content](#complete-vs-streaming-content) for more information on handling sequential media type in a streaming context, including special considerations for `text/event-stream` content.
111
+
See [Complete vs Streaming Content](#complete-vs-streaming-content) for more information on handling sequential media types in a streaming context, including special considerations for `text/event-stream` content.
112
112
113
113
#### Media Type Registry
114
114
@@ -2424,7 +2424,9 @@ This object MAY be extended with [Specification Extensions](#specification-exten
2424
2424
For simpler scenarios, a [`schema`](#header-schema) and [`style`](#header-style) can describe the structure and syntax of the header.
2425
2425
When `example` or `examples` are provided in conjunction with the `schema` field, the example MUST follow the prescribed serialization strategy for the header.
2426
2426
2427
-
Serializing with `schema` is NOT RECOMMENDED for headers with parameters (name=value pairs following a `;`) in their values, or where values might have non-URL-safe characters; see [Appendix D](#appendix-d-serializing-headers-and-cookies) for details.
2427
+
Serializing headers with `schema` can be problematic due to the URI percent-encoding that is automatically applied, which would percent-encode characters such as `;` that are used to separate primary header values from their parameters.
2428
+
The `allowReserved` field can disable most but not all of this behavior.
2429
+
See [Appendix D](#appendix-d-serializing-headers-and-cookies) for details and further guidance.
2428
2430
2429
2431
When `example` or `examples` are provided in conjunction with the `schema` field, the example SHOULD match the specified schema and follow the prescribed serialization strategy for the header.
2430
2432
The `example` and `examples` fields are mutually exclusive, and if either is present it SHALL _override_ any `example` in the schema.
@@ -2433,6 +2435,7 @@ The `example` and `examples` fields are mutually exclusive, and if either is pre
2433
2435
| ---- | :----: | ---- |
2434
2436
| <aname="header-style"></a>style |`string`| Describes how the header value will be serialized. The default (and only legal value for headers) is `"simple"`. |
2435
2437
| <aname="header-explode"></a>explode |`boolean`| When this is true, header values of type `array` or `object` generate a single header whose value is a comma-separated list of the array items or key-value pairs of the map, see [Style Examples](#style-examples). For other data types this field has no effect. The default value is `false`. |
2438
+
| <aname="header-allow-reserved"></a>allowReserved |`boolean`| When this is true, header values are serialized using reserved expansion, as defined by [RFC6570](https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3), which allows [RFC3986's reserved character set](https://datatracker.ietf.org/doc/html/rfc3986#section-2.2), as well as percent-encoded triples, to pass through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of percent-encoded triples). See [Appendix D: Serializing Headers and Cookies](#appendix-d-serializing-headers-and-cookies) for guidance on header encoding and escaping. The default value is `false`. |
2436
2439
| <aname="header-schema"></a>schema |[Schema Object](#schema-object)| The schema defining the type used for the header. |
2437
2440
| <aname="header-example"></a>example | Any | Example of the header's potential value; see [Working With Examples](#working-with-examples). |
2438
2441
| <aname="header-examples"></a>examples | Map[`string`, [Example Object](#example-object)\|[Reference Object](#reference-object)]| Examples of the header's potential value; see [Working With Examples](#working-with-examples). |
0 commit comments