Short description
Writing types for API's especially giant JSON's are frustrating especially when it comes to input validation.
solution:
Just paste your json inside app.quicktype.io or it's vscode
Now you can paste that type into transform.tools/typescript-to-zod to generate the corresponding zod schema for input validation:
Note 🏅 For Practical step by step example check this 4min youtube video:


Oldest comments (5)
Amature hour
A schema from backend can speed up generating types
Yeah, but Most of the time schema for 3rd party api's are not available.
And what about nullable types? That's why I prefer to stick to the server-side scheme
It supports that too. bu what do you mean about server side scheme? can you please explain more