Migrate castPollVote request body to generated CastPollVoteRequest and VoteData models#6567
Conversation
…d VoteData models
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 Run ID: 📒 Files selected for processing (6)
💤 Files with no reviewable changes (1)
WalkthroughPoll vote casting now uses new Moshi network models, updates the polls API request type, removes legacy vote DTOs, and adjusts client implementation and tests for option and answer votes. ChangesPoll vote model migration
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: 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 |
andremion
left a comment
There was a problem hiding this comment.
LGTM. Verified the generated names and wire shape against the backend, and no remaining references to the removed types.
|
🚀 Available in v7.6.0 |



Goal
Migrate the
castPollVoterequest body (POST /messages/{id}/polls/{poll_id}/vote) to the generatedCastPollVoteRequest+VoteDatanetwork models. Part of the incremental OpenAPI model migration.Part of AND-1291
Implementation
internal CastPollVoteRequest(wrapsvote) andVoteData(option_id/answer_text) innetwork.models. Remove the hand-writtenPollVoteRequest+UpstreamVoteDtofromPollRequests.kt. Real names, no alias.PollsApi.castPollVoteand theMoshiChatApivote/answer wiring use the generated types. No wire-shape change: still{"vote":{"option_id":…}}/{"vote":{"answer_text":…}}.Testing
spotlessApply,apiCheck(no API drift),detekt,lint, and the full clienttestDebugUnitTestsuite pass (thecastPollVote/castPollAnswertests assert the exact request body).{"vote":{"option_id":"…"}}returns201, and{"vote":{"answer_text":"probe answer"}}returns201; both return a validVote.Summary by CodeRabbit
Bug Fixes
Tests