Skip to content

skip-ci [Post migration cleanup #1] OpenAPI: Remove v1 JSON decoding compatibility - #4291

Closed
laevandus wants to merge 5 commits into
open-api-connectfrom
open-api-cleanup-sourcery
Closed

laevandus wants to merge 5 commits into
open-api-connectfrom
open-api-cleanup-sourcery

Conversation

@laevandus

@laevandus laevandus commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

馃敆 Issue Links

Related: IOS-2049
Requires #4288 to merge first.

馃幆 Goal

Cleanup v1 model compatibility after migrating endpoints to v2

馃摑 Summary

  • Generated models were used for both v1 and v2 endpoint data during incremental migration, this is not needed anymore

馃洜 Implementation

v1 endpoints returned extra fields flattened, v2 as dedicated custom field which includes all the additional data. During incremental migration JSON decoding was injected to support a single model for both endpoints. This is not needed, but removing it requires updating JSON fixtures to match what v2 returns - custom fields.
Note that SyncResponse keeps its tolerant decoding support because WSEvent is an enum and one event would otherwise take down the whole decoding. There is a ticket to find alternatives.

馃帹 Showcase

馃И Manual Testing Notes

Manual regression tests

鈽戯笍 Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

Every endpoint and the web socket now use the v2 encoding, which always nests
custom data under `custom`. The generated models decode with synthesized
Codable, SyncResponse keeps its tolerant events decoding in a hand-written
extension, and the fixtures are converted to the v2 shape.
@laevandus
laevandus requested a review from a team as a code owner September 28, 2026 06:55
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

鉂わ笍 Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
1 Warning
鈿狅笍 Big PR
1 Message
馃摉 There seems to be app changes but CHANGELOG wasn't modified.
Please include an entry if the PR includes user-facing changes.
You can find it at CHANGELOG.md.

Generated by 馃毇 Danger

@Stream-SDK-Bot

Copy link
Copy Markdown
Collaborator

SDK Performance

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 30.87 ms -208.7% 馃斀 馃敶
Duration 2.6 s 2.54 s 2.31% 馃敿 馃煝
Hitch time ratio 4 ms per s 12.13 ms per s -203.25% 馃斀 馃敶
Frame rate 75 fps 78.52 fps 4.69% 馃敿 馃煝
Number of hitches 1 1.6 -60.0% 馃斀 馃敶

@Stream-SDK-Bot

Copy link
Copy Markdown
Collaborator

SDK Size

title develop branch diff status
StreamChat 7.64 MB 7.92 MB +281 KB 馃煛
StreamChatUI 3.38 MB 3.38 MB 0 KB 馃煝
StreamChatCommonUI 0.99 MB 0.99 MB 0 KB 馃煝

@Stream-SDK-Bot

Copy link
Copy Markdown
Collaborator

StreamChat XCSize

Object Diff (bytes)
EventPayload.o -18940
WSEvent.o +17633
NotificationEvents.o -17338
WebSocketConnectPayload.o -11616
UserEvents.o -10975
Show 140 more objects
Object Diff (bytes)
AttachmentDownloader.o +10054
MessageEvents.o -8754
AnyAttachmentPayload.o +8106
EventType.o -7981
NotificationMarkUnreadEventDTO.o +7884
ConnectionEvents.o +7462
MessageNewEventDTO.o +7405
NotificationMarkReadEventDTO.o +7358
ChannelEvents.o -7340
SyncResponse.o +6895
ConnectUserDetailsRequest.o +6714
NotificationNewMessageEventDTO.o +6693
UserBannedEventDTO.o +6682
ReactionDeletedEventDTO.o +6674
ReactionUpdatedEventDTO.o +6642
MessageDeliveredEventDTO.o +6599
ReactionNewEventDTO.o +6598
Event.o +6593
MessageDeletedEventDTO.o +6527
UnknownChannelEvent.o +6432
MessageReadEventDTO.o +6425
NotificationChannelDeletedEventDTO.o +6421
NotificationThreadMessageNewEventDTO.o +6371
TypingStartEventDTO.o +6262
ChannelTruncatedEventDTO.o +6218
GuestUserTokenPayload.o -6217
TypingStopEventDTO.o +6184
MemberAddedEventDTO.o +6162
NotificationRemovedFromChannelEventDTO.o +6158
NotificationInvitedEventDTO.o +6132
MessageUpdatedEventDTO.o +6128
MemberUpdatedEventDTO.o +6122
ChannelUpdatedEventDTO.o +6108
ChannelHiddenEventDTO.o +6105
WSAuthMessage.o +6103
AIIndicatorUpdateEventDTO.o +6024
NotificationInviteAcceptedEventDTO.o +5931
NotificationInviteRejectedEventDTO.o +5911
UserWatchingStartEventDTO.o +5868
ChannelVisibleEventDTO.o +5865
MessagePayloads.o -5842
MemberRemovedEventDTO.o +5835
UserWatchingStopEventDTO.o +5827
GuestUserTokenRequestPayload.o -5782
ChannelDeletedEventDTO.o +5690
NotificationAddedToChannelEventDTO.o +5646
HealthCheckEventDTO.o +5637
DraftDeletedEventDTO.o +5627
MissingEventsPayload.o -5626
PollVoteCastedEventDTO.o +5621
UserUnbannedEventDTO.o +5614
ReminderCreatedEventDTO.o +5597
UserMessagesDeletedEventDTO.o +5578
PollVoteChangedEventDTO.o +5577
ReminderNotificationEventDTO.o +5574
PollVoteRemovedEventDTO.o +5568
DraftUpdatedEventDTO.o +5563
ReminderDeletedEventDTO.o +5561
ReminderUpdatedEventDTO.o +5561
AIIndicatorClearEventDTO.o +5419
NotificationChannelMutesUpdatedEventDTO.o +5403
ThreadUpdatedEventDTO.o +5387
UserPresenceChangedEventDTO.o +5387
PollClosedEventDTO.o +5364
NotificationMutesUpdatedEventDTO.o +5226
PollUpdatedEventDTO.o +5199
PollDeletedEventDTO.o +5199
UserUpdatedEventDTO.o +5195
AIIndicatorStopEventDTO.o +5120
MissingEventsRequestBody.o -4793
SyncRequest.o +4789
CreateGuestResponse.o +4714
UserRequest.o +4705
ReminderEvents.o -4308
EventDecoder.o +4252
CreateGuestRequest.o +4207
ThreadEvents.o -3951
PollsEvents.o -3906
MemberEvents.o -3852
UnknownUserEvent.o +2802
ReactionEvents.o -2580
DraftEvents.o -2576
ConnectionRepository.o +2527
UserPayload.o -2509
AITypingEvents.o -2057
RequestEncoder.o -2040
BanRequest.o +1772
OwnUserResponse.o -1647
MessageAttachmentPayload.o -1504
DefaultEndpoints.o -1444
APIClient.o -1372
MemberPayload.o -1320
EventNotificationCenter.o +1272
ThreadStateResponse.o -1253
ChannelDetailPayload.o -1231
TypingEvent.o -1198
ThreadResponse.o -1129
MemberContainerPayload.o -1069
UserListController.o -940
DatabaseSession.o -924
DraftMessagePayload.o -881
WSAuthMessage+Extensions.o +792
ThreadParticipantPayload.o -789
SyncRepository.o +788
ChannelListPayload.o +750
SyncOperations.o +749
StringInterpolation+Extensions.o -741
MessageResponse.o -709
SearchResultMessage.o -705
MessageReactionPayload.o -645
MemberInfoPayload.o -585
AuthenticationRepository.o -540
CreateGuestResponse+Extensions.o +532
UserWatchingEventMiddleware.o +526
StreamCDNStorage.o -472
AppSettings+Extensions.o +462
MessageDTO.o +448
EventDataProcessorMiddleware.o +373
ChannelDeliveredMiddleware.o +324
TypingStartCleanupMiddleware.o +208
MemberUserRequest.o -205
ChannelReadUpdaterMiddleware.o +192
SystemEnvironment.o +189
UserChannelBanEventsMiddleware.o +168
EventMiddleware.o +164
EventDTOConverterMiddleware.o +130
AttachmentDTO.o +120
UserTypingStateUpdaterMiddleware.o +116
ManualEventHandler.o +100
ThreadUpdaterMiddleware.o +100
ChannelListLinker.o +80
Filter.o +72
FullUserResponse.o -71
UpdateChannelPartialRequest.o -68
BlockUsersResponse.o -68
MessageAttachmentPayload+Extensions.o +64
MessageReactionDTO.o -58
TypingUser.o -48
ReminderUpdaterMiddleware.o -44
LivestreamChannelController.o +44

@github-actions

Copy link
Copy Markdown

Public Interface

馃殌 No changes affecting the public interface.

@sonarqubecloud

Copy link
Copy Markdown

@laevandus
laevandus marked this pull request as draft September 28, 2026 09:25
@laevandus laevandus changed the title [Post migration cleanup #1] OpenAPI: Remove v1 JSON decoding compatibility skip-ci [Post migration cleanup #1] OpenAPI: Remove v1 JSON decoding compatibility Sep 28, 2026
@laevandus laevandus closed this Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants