Migrate CommandDto to the generated Command network model - #6593
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
|
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 (6)
💤 Files with no reviewable changes (1)
WalkthroughThe API2 command DTO is replaced by a Moshi-serializable network ChangesCommand model consolidation
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
SDK Size Comparison 📏
|
|



Goal
Migrate the downstream
CommandDto(channelconfig.commands) to the generatedCommandnetwork model. Part of the incremental OpenAPI model migration.Part of AND-1291
Implementation
internal Commandinnetwork.models(patch-free; adds optionalcreated_at/updated_atthe hand-written DTO lacked, ignored by the mapper). Delete the hand-writtenapi2.model.dto.CommandDto.io.getstream.chat.android.models.Command, so it's imported aliased asCommandDto(consistent with the codebase's*Dtowire-type convention) in the files that reference it:ConfigDto(commands: List<CommandDto>),DomainMapping(CommandDto.toDomain()), and two test fixtures. This is genuine domain-vs-network disambiguation, not a migration-reminder alias. No wire-shape change; construction sites use named args so the generated field reorder is irrelevant.Testing
spotlessApply,apiCheck(no API drift),detekt, and the full clienttestDebugUnitTestsuite pass.MIGRATE_PROBEFAB (queried channels, logged parsedconfig.commands): commands deserialized correctly through the generated model into domainCommand— e.g.giphy/[text]/fun_set,mute/[@username]/moderation_set, etc. — confirming the read-path parse.Summary by CodeRabbit