Page MenuHomePhabricator

[keyserver][lib] Move clientResponseInputValidator to lib
ClosedPublic

Authored by ashoat on Jun 8 2024, 3:34 PM.
Tags
None
Referenced Files
F3493381: D12361.id41183.diff
Thu, Dec 19, 3:09 AM
F3492403: D12361.diff
Wed, Dec 18, 11:42 PM
Unknown Object (File)
Sun, Dec 15, 3:05 AM
Unknown Object (File)
Sun, Dec 15, 3:05 AM
Unknown Object (File)
Sun, Dec 15, 3:04 AM
Unknown Object (File)
Sun, Dec 15, 3:03 AM
Unknown Object (File)
Nov 12 2024, 4:46 PM
Unknown Object (File)
Nov 12 2024, 4:17 PM
Subscribers
None

Details

Summary

Initially, I thought I needed to move these to lib because I was about to introduce a new endpoint that took ClientResponses as input.

I ended up removing ClientResponses from the input, so this diff isn't really necessary.

That said, I feel like it's probably "good practice" in our codebase to move all validators to lib, so I decided to put this diff up. If reviewers disagree, I'm open to abandoning it.

Note that this also required moving some validators for reports.

Depends on D12360

Test Plan

This is a pure move diff. Careful code inspection and Flow

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat requested review of this revision.Jun 8 2024, 3:51 PM
tomek added inline comments.
lib/types/request-types.js
21–26 ↗(On Diff #41138)

In most of the places we don't use shape suffixes for types and validators, so maybe we can remove them. But it's up to you.

This revision is now accepted and ready to land.Jun 10 2024, 3:47 AM
lib/types/request-types.js
21–26 ↗(On Diff #41138)

I think the "shape" suffix is here because the type is not used for a response/result/payload, but rather is a shape that gets combined with some type field before being used for a response/result/payload

lib/types/request-types.js
21–26 ↗(On Diff #41138)

Ok, makes sense!