https://github.com/llllvvuu/zoderror-zod-schema
zod schema matching the `z.ZodError` class
https://github.com/llllvvuu/zoderror-zod-schema
Last synced: 3 months ago
JSON representation
zod schema matching the `z.ZodError` class
- Host: GitHub
- URL: https://github.com/llllvvuu/zoderror-zod-schema
- Owner: llllvvuu
- Created: 2023-08-20T06:43:03.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-24T07:35:08.000Z (almost 2 years ago)
- Last Synced: 2025-02-26T18:08:34.942Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `zoderror-zod-schema`
This is mostly a codegen/docgen hack, it would be ideal to just use the `z.ZodError` class directly, but [my OpenAPI tooling](https://github.com/ts-rest/ts-rest.git) generates from Zod schemas so here is a Zod schema that matches the `z.ZodError` class.
TS-to-zod tooling didn't work out of the box for me so I manually supervised/massaged it and Copilot.
## Usage
```sh
pnpm install @llllvvuu/zoderror-zod-schema
``````typescript
import { ZodErrorSchema, ZodIssueSchema } from "@llllvvuu/zoderror-zod-schema"
```## [API Reference](./api-reference/index.md)
[API Report](./api-report.md)