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
Unknown Object (File)
Mon, Feb 17, 5:56 AM
Unknown Object (File)
Wed, Feb 12, 8:38 PM
Unknown Object (File)
Wed, Feb 12, 8:38 PM
Unknown Object (File)
Wed, Feb 12, 8:38 PM
Unknown Object (File)
Wed, Feb 12, 8:37 PM
Unknown Object (File)
Wed, Feb 12, 8:37 PM
Unknown Object (File)
Jan 11 2025, 5:07 PM
Unknown Object (File)
Jan 6 2025, 3:00 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
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