monkeytype icon indicating copy to clipboard operation
monkeytype copied to clipboard

Switch to Zod for schema validation, pass types to the endpoint handlers.

Open monkeytypegeorge opened this issue 1 year ago • 3 comments

Currently, we use JOI for endpoint schema validation which does not support Typescript. Because of this, the controllers don't know whats inside query or body. We should switch to ZOD and then provide the types to the async handlers.

monkeytypegeorge avatar May 24 '24 12:05 monkeytypegeorge

Maybe checkout https://typia.io/docs/ ?

fehmer avatar May 27 '24 17:05 fehmer

Or https://valibot.dev/ 🙄

Miodec avatar May 28 '24 08:05 Miodec

or https://www.npmjs.com/package/ts-to-zod

fehmer avatar May 28 '24 17:05 fehmer