from Hacker News

Show HN: A tool to visualise Zod validation errors

by disintegrator on 10/1/24, 3:08 PM with 1 comments

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.