Page MenuHomePhabricator

[identity] Add Serialize trait for inbound keys types
ClosedPublic

Authored by bartek on Mon, Jun 3, 11:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 24, 10:28 AM
Unknown Object (File)
Mon, Jun 24, 9:30 AM
Unknown Object (File)
Mon, Jun 24, 8:16 AM
Unknown Object (File)
Fri, Jun 21, 11:01 AM
Unknown Object (File)
Fri, Jun 21, 7:47 AM
Unknown Object (File)
Wed, Jun 19, 12:33 AM
Unknown Object (File)
Sat, Jun 15, 1:03 PM
Unknown Object (File)
Sat, Jun 15, 7:33 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.Tue, Jun 4, 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.Thu, Jun 6, 2:13 AM

Adapt to the new response format