Migrate query channels, users, and grouped channels request bodies to generated models - #6597
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
💤 Files with no reviewable changes (2)
WalkthroughMigrates channel, grouped-channel, and user query requests from client API models to Moshi-serializable network models, updates API signatures and field mappings, removes obsolete request definitions, and adjusts ChangesQuery payload model migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
andremion
left a comment
There was a problem hiding this comment.
LGTM. Two small non-blocking comments inline.
… generated models
…e production conditional
a329ed8 to
03907bb
Compare
|
|
🚀 Available in v7.7.0 |


Goal
Migrate the query-* request bodies to their generated OpenAPI models.
Part of AND-1291
Implementation
queryChannels-> generatedQueryChannelsRequest(sort now viatoSortParams();filterValues/sortValuesvia.orEmpty()).queryUsers-> generatedQueryUsersPayload.queryGroupedChannels-> generatedGroupedQueryChannelsRequest+GroupedChannelsGroupRequest.QueryChannelsRequest,QueryUsersRequest,QueryGroupedChannelsRequestrequest DTOs.queryBannedUsersleft hand-written on purpose: the generatedQueryBannedUsersPayloadomits thecreated_at_after/before(_or_equal)filter fields the current request sends, so migrating it would drop those filters.Testing
MoshiChatApiTestpayload assertions to the generated models.spotlessApply,apiCheck(no public-API change),detekt, full clienttestDebugUnitTest, andlintall pass.queryChannels:sort:[{direction,field}],filter_conditions, and the new emptyfilter_values:{}/sort_values:{}/member_custom_include:[]accepted by the backend (201, real channels).queryUsers:filter_conditions/sort/limit/offset/presenceserialized correctly (200, real user).queryGroupedChannels: body{"groups":{"messaging":{}},...}serialized correctly (endpoint is enterprise-gated, so it returns 403 on this app; serialization verified).Summary by CodeRabbit