HomePhabricator
Diffusion Comm 267b60b70a7e

[lib] Bind output validators to endpoints on lib

Description

[lib] Bind output validators to endpoints on lib

Summary:
issue: ENG-8080
As I explained in the issue, I wanted to simply use those objects instead of objects in lib/types/endpoints.js. But this causes very complicated import cycles. I know how to solve them, but it would requre refactoring a lot of files, hundreds possibly.
So instead I am creating a separate file with this mapping endpoint-output validator. The dev will not be able to forget about adding the validator here, because that would cause flow issues in the next diff.

Test Plan: Tested with next diffs - checked a couple of endpoints, and verified that no errors are thrown if outputs are validated with validators specified by endpointValidators for those endpoints.

Reviewers: tomek, kamil, bartek

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D12030

Details

Provenance
inkaAuthored on May 14 2024, 12:27 AM
Reviewer
tomek
Differential Revision
D12030: [lib] Bind output validators to endpoints on lib
Parents
rCOMMc4417a4b0009: [lib][keyserver] Move upload output validators to lib
Branches
Unknown
Tags
Unknown