Repository navigation
chore(llc): regenerate the OpenAPI client from openapi-v240.1.0 - #3131
Conversation
The generator emits each event union as a sealed class with a fromJson factory and a toJson, so json_serializable decodes EventResponse.event and SyncResponse.events itself. The post-generation patch that added converters and re-exported WsEvent is gone, and the client is regenerated from the same spec (openapi-v239.70.0). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
The spec names the enums its schemas used to declare inline, so the mappers and tests move to the shared types: PushProviderName, DeleteMessages, VotingVisibility, PushLevel, ChannelModerationBehavior and AutomodMode. UnreadCountsChannel now requires hasUnread, and DeviceResponse.pushProvider is a PushProviderName. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Generated enum extension types have a public const constructor now, so a value from a String no longer needs to go through fromJson. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…oder Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v11 #3131 +/- ##
======================================
Coverage ? 80.39%
======================================
Files ? 495
Lines ? 29616
Branches ? 0
======================================
Hits ? 23809
Misses ? 5807
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
VelikovPetar
left a comment
There was a problem hiding this comment.
Looks good, just one small cleanup comment!
| @@ -123,7 +123,7 @@ extension PollRequestMapper on Poll { | |||
| name: name, | |||
| description: description, | |||
| options: [for (final option in options) option.toPollOptionInput()], | |||
| votingVisibility: api.CreatePollRequestVotingVisibility.fromJson(votingVisibility), | |||
| votingVisibility: api.VotingVisibility(votingVisibility), | |||
There was a problem hiding this comment.
I think we might need to update some of the names in the migration plans (generate_plan.py) - they might be referencing old names.
And the /openapi-codegen skill now has some outdated references to the old enum types.
Adds the user.claimed event and new optional fields. Also brings the codegen skill docs in line: there are no post-generation patches and the spec now names shared enums. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The device and ban decisions now give their current reasons, the sync note describes the sealed union rather than the removed patch, and the README counts group 11's 19 operations. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Picks up GetStream/chat#20013: AutomodMode.aI is now ai and the fork message IDs models are fork_message_ids_*. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Submit a pull request
Linear: FEEDS-2158
CLA
Description of the pull request
Generated with the Dart generator from GetStream/chat#19582, now on chat
master(88a43bb3e4), which also includes GetStream/chat#20013:AutomodMode.aIis nowaiand the fork message IDs models arefork_message_ids_*.Removes
patch_ws_event_modelsfromscripts/generate.sh. That step added converters toEventResponse.eventandSyncResponse.eventsand re-exportedWsEvent. With #19582, the generator emits each event union as asealed classwith afromJsonfactory and atoJson, so json_serializable decodes those fields itself. The patch's own comment asked for removal once that happened.Regenerated
lib/open_apifrom the latest spec,openapi-v240.1.0(wasopenapi-v239.70.0):ws_event.dartandws_client_event.dartare replaced bymodel/events.dart.WSEventandWSClientEventare sealed there, and the event models are its parts.EventResponseandSyncResponseuse plain@JsonKeys.constconstructor and nofromJson/toJson, so the hand-writtenX.fromJson(v)calls are nowX(v).Moved to the shared enum types the newer spec names:
PushProviderName,DeleteMessages,VotingVisibility,PushLevel,ChannelModerationBehaviorandAutomodMode. This is in three mappers and their tests. Also:UnreadCountsChannelnow requireshasUnread.DeviceResponse.pushProvideris aPushProviderName.Verification:
flutter testinstream_chat: all 2019 tests pass, the same count as onv11.dart analyzeinstream_chat: no issues.🤖 Generated with Claude Code