Closed tamaki-tech closed 1 year ago
Hello,
You should read zod documentation. Partial is only for allowing undefined properties. If you want to also allow null
values, use nullable :
https://github.com/colinhacks/zod#nullables
const LoginResponse = z
.object({
access_token: z.string().nullable(),
session: z.string().nullable()
}).partial();
Hello, First, I'd like to thank you for this library.
There's something I'd like to ask.
I want to use schema responses contains Optional properties with Zodios.
But I got a validation Error.
do i need to do anything?