Page MenuHomePhabricator

[identity] Add Serialize trait for inbound keys types
ClosedPublic

Authored by bartek on Jun 3 2024, 11:52 PM.
Tags
None
Referenced Files
F3392200: D12300.id41098.diff
Sat, Nov 30, 7:31 AM
Unknown Object (File)
Thu, Nov 28, 10:03 PM
Unknown Object (File)
Thu, Nov 28, 10:52 AM
Unknown Object (File)
Thu, Nov 28, 9:07 AM
Unknown Object (File)
Wed, Nov 27, 5:35 AM
Unknown Object (File)
Sun, Nov 24, 12:49 AM
Unknown Object (File)
Sat, Nov 23, 5:06 PM
Unknown Object (File)
Thu, Nov 14, 11:56 AM
Subscribers

Details

Summary

Added serialize derive for structs that are part of the inbound keys response
This will be required for sending these in the inbound keys HTTP response

Alternatively, I could create a dedicated JSON-only structs and provide conversion traits, not to obfuscate existing structs, but this can be done at any time as a follow up.

Test Plan

In get_inbound_keys handler, used serde_json::to_string() to print out results.
The JSON structure is as proposed in ENG-8290.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Jun 4 2024, 8:12 AM
bartek added inline comments.
services/identity/src/database/device_list.rs
87–88 ↗(On Diff #40911)

This is a proto enum that doesn't implement Serialize trait. Implemented a simple custom one

This revision is now accepted and ready to land.Jun 6 2024, 2:13 AM

Adapt to the new response format