Originate / recouple

Declarative and type-safe API bridging. Write full-stack applications with ease.
MIT License
4 stars 1 forks source link

Output Validation #26

Open sleexyz opened 6 years ago

sleexyz commented 6 years ago

We want output validation on the client side so that clients can fail early on invalid responses from non-safe-api servers.

This will require a runtime type validation library, like validated or flow-runtime


Output validation might also enable full inference of the endpoint type. Right now the output type is completely phantom in the endpoint definition (not phantom in the server route constructor though), and attempting inference breaks flow.

Whether we want annotations alongside endpoint terms is another discussion. I personally think annotating input and output is good for documentation purposes.