We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using zod it can return various errors when parsing.
I would be nice if the zod library itself would expose a zod schema for these errors (dogfooding).
This could be very useful when e.g. using zod-openapi to use it as error response schema in a 400/422.
import * as z from "zod"; .. responses: { 200: { description: 'OK', content: { 'application/json': { schema: PetSchema, }, }, }, 400: { description: 'Invalid request', content: { 'application/json': { schema: z .object({ errors: z.array(z.errorSchema), // <-- what is proposed to be exposed by zod }), }, }, },
The text was updated successfully, but these errors were encountered:
Maybe a stringed variant of the schema satisfies your needs?
Sorry, something went wrong.
No branches or pull requests
When using zod it can return various errors when parsing.
I would be nice if the zod library itself would expose a zod schema for these errors (dogfooding).
This could be very useful when e.g. using zod-openapi to use it as error response schema in a 400/422.
The text was updated successfully, but these errors were encountered: