HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Show HN: A tool to visualise Zod validation errors(zod.fyi)

17 points·by disintegrator·2 anni fa·1 comments
zod.fyi
Show HN: A tool to visualise Zod validation errors

https://zod.fyi

I work on code generator that creates TypeScript SDKs from OpenAPI specs and Zod (https://zod.dev/) is a critical building block that I chose to power runtime validation in those SDKs. Depending on the complexity of a Zod schema, the resulting validation error message can contain a wall of JSON text - the serialised issues that were recorded during validation.

I wanted to try and create a small tool to help me better visualise and parse these errors. In code and the command line, we do also have the ability to pretty-print the errors but I still wanted a web UI which can let me share URLs for visualised errors.

I'm still iterating on it but would love any feedback if you do get to try it out.

1 comments

LukeHagar·2 anni fa
I love it!

Zod is such a great tool but its errors can be a bit hard to parse.

Reminds me a lot of https://github.com/yoavbls/pretty-ts-errors

Disclaimer: I work with OP