This content originally appeared on DEV Community and was authored by DX Knight
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:
This content originally appeared on DEV Community and was authored by DX Knight
DX Knight | Sciencx (2023-04-22T15:00:12+00:00) Fastest Way to Auto Generate Types for Typescript and Input validation. Retrieved from https://www.scien.cx/2023/04/22/fastest-way-to-auto-generate-types-for-typescript-and-input-validation/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.