You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when there is an actual parent, the error message states The values of <schema> does not match schema definition
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "The value of '#/definitions/getUserByIdResponseSchema/properties/parent' does not match schema definition."
}
Is there any way to explicitly tell fastify-zod to safeParse the object?
The text was updated successfully, but these errors were encountered:
KarlGNassar
changed the title
Nullable Zod Object errors out
Nullable Zod Object Errors Out
Jul 19, 2023
I want the final response of the API to look something like this:
So the parent can be nullable, I define my schema like this:
When the parent is actually null, the response is like expected:
But when there is an actual parent, the error message states
The values of <schema> does not match schema definition
Is there any way to explicitly tell fastify-zod to safeParse the object?
The text was updated successfully, but these errors were encountered: