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
+4-10Lines changed: 4 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ Each mapping is addressed where the relevant media type is discussed in this sec
91
91
92
92
#### Sequential Media Types
93
93
94
-
Within this specification, a _sequential media type_ is defined as any media type that consists of a repeating structure, separated by some delimiter, without any sort of header, footer, envelope, or other metadata in addition to the sequence.
94
+
Within this specification, a _sequential media type_ is defined as any media type that consists of a repeating structure, without any sort of header, footer, envelope, or other metadata in addition to the sequence.
95
95
96
96
Some examples of sequential media types (including some that are not IANA-registered but are in common use) are:
97
97
@@ -1660,8 +1660,8 @@ See also the [Media Type Registry](#media-type-registry).
1660
1660
##### Complete vs Streaming Content
1661
1661
1662
1662
The `schema` field MUST be applied to the complete content, as defined by the media type and the context ([Request Body Object](#request-body-object), [Response Object](#response-object), [Parameter Object](#parameter-object), or [Header Object](#header-object).
1663
-
Unless some sort of streaming JSON Schema processor is available, this requires loading the entire content into memory.
1664
-
This poses a challenge for streamed content, particularly streams where the client is intended to choose when to stop reading as there is no well-defined end to the stream.
1663
+
Because this requires loading the content into memory in its entirety, it poses a challenge for streamed content.
1664
+
Use cases where client is intended to choose when to stop reading are particularly challenging as there is no well-defined end to the stream.
1665
1665
1666
1666
###### Binary Streams
1667
1667
@@ -1680,13 +1680,7 @@ For example, if partial content is read from a stream and then passed with the `
1680
1680
1681
1681
##### Special Considerations for `text/event-stream` Content
1682
1682
1683
-
For `text/event-stream`, each item in the array MUST be treated as if it were a JSON object with property names taken from the left side of the `:` (or the enter non-empty line if no ":" is present), property values from the right side, and consecutive lines with the same name treated as a single property, with the value combined in accordance with the [`text/event-stream` specification](https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream).
1684
-
1685
-
Field names can be repeated within an item to allow splitting the value across multiple lines; such split values MUST be treated the same as if they were a single field, with newlines added as required by the [`text/event-stream` specification](https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream).
1686
-
Similarly, when a field name appears without a value, the value MUST be treated as an empty string.
1687
-
1688
-
The `text/event-stream` specification requires that fields with Unknown names, as well as `id` fields where the value contains `U+0000 NULL` and `retry` fields with characters other than ASCII digits be ignored.
1689
-
These fields SHOULD NOT be present in the data used with the Schema Object.
1683
+
For `text/event-stream`, implementations MUST work with event data after it has been parsed according to the [`text/event-stream` specification](https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream), including all guidance on ignoring certain fields (including comments) and/or values, and on combining values split across multiple lines.
1690
1684
1691
1685
Field value types MUST be handled as specified by the `text/event-stream` specification (e.g. the `retry` field value is modeled as a JSON number that is expected to be of JSON Schema `type: integer`), and fields not given an explicit value type MUST be handled as strings.
0 commit comments