-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hi, im trying to get the type safety working with my API but I already have a ton of zod schemas defined in another file, when I try to use these it wont work.
const { data } = await validate(request, {
mySchema
});
gives
Error: "Invalid data: at 'mySchema': 'Required'."
const { data } = await validate(request, {
...mySchema.shape
});
gives
error when starting dev server: TypeError: Cannot read properties of undefined (reading 'getBaseTypes')
const { data } = await validate(request, mySchema);
gives
Argument of type 'ZodObject<{ mystuff }, "strip", ZodTypeAny, { ...; }, { ...; }>'.
Is there any way to make this work?
Metadata
Metadata
Assignees
Labels
No labels