Open eddie-englund opened 1 year ago
Although I notice that if I don't supply a 500 and 400 in the response schema I guess something like this:
{
"statusCode": 400,
"error": "Bad Request",
"message": "[\n {\n \"code\": \"invalid_type\",\n \"expected\": \"string\",\n \"received\": \"undefined\",\n \"path\": [\n \"adminUsername\"\n ],\n \"message\": \"Required\"\n }\n]"
}
But this would force the client to parse the "message" property to json. Would it be possible to have this as actual json instead? Also this makes it so that I can't type my response in case of errors where want to return 400, 401, 500, etc.
@eddie-englund Hello! How are you? I think this is a duplicate of https://github.com/turkerdev/fastify-type-provider-zod/issues/26
Hey!
I was just wondering how I'm supposed to add the response schema that for example a zod object can return when validation fails.
Currently, if validation fails all I get is this: