Skip to content

Strip newlines when parsing events - #206

Merged
czechboy0 merged 3 commits into
apple:mainfrom
kukushechkin:strip-newlines-when-parsing-events
Jul 30, 2026
Merged

Strip newlines when parsing events#206
czechboy0 merged 3 commits into
apple:mainfrom
kukushechkin:strip-newlines-when-parsing-events

Conversation

@kukushechkin

Copy link
Copy Markdown
Contributor

Motivation

The id and event fields aren't normalized the same way data already is, so they could end up split across multiple lines.

Modifications

Strip newlines from id and event.

Result

id and event each is serialized into a single line.

Test Plan

Unit test.

@kukushechkin kukushechkin added the 🔨 semver/patch No public API change. label Jul 29, 2026

@czechboy0 czechboy0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit, lgtm otherwise - thanks @kukushechkin 🙏

Comment thread Sources/OpenAPIRuntime/EventStreams/ServerSentEventsEncoding.swift Outdated
…wift

Co-authored-by: Honza Dvorsky <honza@apple.com>
@czechboy0
czechboy0 merged commit e48392d into apple:main Jul 30, 2026
49 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants