Skip to content

Commit de51f3d

Browse files
paulhdkczechboy0
andauthored
Docs: Reference Handling of Custom Terminating Byte Sequences (#625)
### Motivation See: apple/swift-openapi-runtime#115 ### Modifications This PR references the changes introduced by TODO in the documentation. ### Result Users planning to generate code for OpenAPI specs with custom terminating byte sequences will hopefully find it easier to make the necessary changes in their code. Please let me know if there are other places where these changes could be mentioned. ### Test Plan . --------- Co-authored-by: Honza Dvorsky <[email protected]>
1 parent 89d49d2 commit de51f3d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/swift-openapi-generator/Documentation.docc/Articles/Useful-OpenAPI-patterns.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ The returned binary body contains the raw events, and the stream can be split up
113113
- encode: `AsyncSequence<some Encodable>.asEncodedJSONSequence(encoder:)`
114114
- Server-sent Events
115115
- decode (if data is JSON): `AsyncSequence<ArraySlice<UInt8>>.asDecodedServerSentEventsWithJSONData(of:decoder:)`
116+
- decode (if data is JSON with a non-JSON terminating byte sequence): `AsyncSequence<ArraySlice<UInt8>>.asDecodedServerSentEventsWithJSONData(of:decoder:while:)`
116117
- encode (if data is JSON): `AsyncSequence<some Encodable>.asEncodedServerSentEventsWithJSONData(encoder:)`
117-
- decode (for other data): `AsyncSequence<ArraySlice<UInt8>>.asDecodedServerSentEvents()`
118+
- decode (for other data): `AsyncSequence<ArraySlice<UInt8>>.asDecodedServerSentEvents(while:)`
118119
- encode (for other data): `AsyncSequence<some Encodable>.asEncodedServerSentEvents()`
119120

120121
See the `event-streams-*` client and server examples in <doc:Checking-out-an-example-project> to learn how to produce and consume these sequences.

0 commit comments

Comments
 (0)