Skip to content

Migrate device endpoints to generated models#6547

Draft
gpunto wants to merge 1 commit into
migrate/serializer-foundationfrom
migrate/devices
Draft

Migrate device endpoints to generated models#6547
gpunto wants to merge 1 commit into
migrate/serializer-foundationfrom
migrate/devices

Conversation

@gpunto

@gpunto gpunto commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Goal

Migrate the /devices endpoints to generated models. Part of the incremental OpenAPI model migration.

Built on top of the Serializer foundation PR (this is the first slice with a generated enum, PushProvider).

Part of AND-1291

Implementation

  • Add generated DeviceResponse, ListDevicesResponse, and CreateDeviceRequest (with the typed PushProvider sealed enum); delete the hand-written DeviceDto, DevicesResponse, and AddDeviceRequest.
  • Register CreateDeviceRequest.PushProvider.PushProviderAdapter() in Serializer (the one-line-per-enum pattern the foundation enables).
  • Point DeviceApi/MoshiChatApi/mappers at the generated types (real names, no aliases); Device.toDto() supplies placeholder createdAt/userId (required by the generated model, ignored by the server on upstream payloads).

Testing

  • Project-wide spotlessApply, apiDump (no API drift), lint, detekt, and testDebugUnitTest all pass.
  • Verified on device: addDevice (generated request + PushProvider enum) succeeds, getDevices parses 22 real DeviceResponses (roundTrip=true), deleteDevice succeeds.

@gpunto gpunto added the pr:internal Internal changes / housekeeping label Jul 6, 2026
@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.

@gpunto gpunto force-pushed the migrate/devices branch from 6202136 to b8ab16b Compare July 6, 2026 11:26
@gpunto gpunto changed the title Migrate device endpoints to generated models and route Moshi through Serializer Migrate device endpoints to generated models Jul 6, 2026
@gpunto gpunto changed the base branch from develop to migrate/serializer-foundation July 6, 2026 11:26
@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.94 MB 0.01 MB 🟢
stream-chat-android-ui-components 11.20 MB 11.20 MB 0.01 MB 🟢
stream-chat-android-compose 12.66 MB 12.67 MB 0.01 MB 🟢

@gpunto gpunto force-pushed the migrate/serializer-foundation branch from 464cbfc to a91a64c Compare July 6, 2026 13:29
@gpunto gpunto force-pushed the migrate/devices branch from b8ab16b to afdf37f Compare July 6, 2026 13:30
@gpunto gpunto force-pushed the migrate/serializer-foundation branch from 9048f69 to 32c54f4 Compare July 6, 2026 13:50
@gpunto gpunto force-pushed the migrate/devices branch from afdf37f to 932db00 Compare July 6, 2026 13:51
@gpunto gpunto force-pushed the migrate/devices branch from 932db00 to dc1ead9 Compare July 7, 2026 10:21
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
61.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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