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.
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.