Skip to content

Migrate read-state request bodies to generated models#6550

Draft
gpunto wants to merge 1 commit into
developfrom
migrate/read-state-requests
Draft

Migrate read-state request bodies to generated models#6550
gpunto wants to merge 1 commit into
developfrom
migrate/read-state-requests

Conversation

@gpunto

@gpunto gpunto commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Goal

Migrate the read-state request bodies (markRead, markUnread) to generated models. Part of the incremental OpenAPI model migration.

Part of AND-1291

Implementation

  • Add generated internal MarkReadRequest and MarkUnreadRequest in network.models; delete the hand-written ones. Point ChannelApi/MoshiChatApi/tests at them.
  • Field names move to camelCase with @Json names preserved (message_id -> messageId, message_timestamp -> messageTimestamp, thread_id -> threadId), so the wire format is unchanged; only positional/named args at the call sites change.
  • markAllRead sends no body, so there is no MarkChannelsReadRequest to migrate here.

Testing

  • Project-wide spotlessApply, apiDump (no API drift), detekt, and testDebugUnitTest all pass.
  • Verified on device: markMessageRead -> 200, markUnread -> 200.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled, or the PR is bot-authored.
  • An issue is linked (Linear ticket or GitHub issue), or the PR is bot-authored.

🎉 Great job! This PR is ready for review.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.93 MB 5.93 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.20 MB 11.19 MB -0.01 MB 🚀
stream-chat-android-compose 12.66 MB 12.67 MB 0.00 MB 🟢

@gpunto gpunto force-pushed the migrate/read-state-requests branch from 96c6a70 to 760bea1 Compare July 7, 2026 13:23
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

@gpunto gpunto added the pr:internal Internal changes / housekeeping label Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:internal Internal changes / housekeeping

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant