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
F3377418: D12300.diff
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
Unknown Object (File)
Fri, Nov 8, 10:30 AM
Unknown Object (File)
Thu, Nov 7, 1:03 PM
Unknown Object (File)
Sat, Nov 2, 1:55 AM
Unknown Object (File)
Fri, Nov 1, 5:30 PM
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
No Lint Coverage
Unit
No Test Coverage

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