Closed kevbook closed 1 year ago
I tried with strict() and without strict(). Anyone can help?
strict()
fastify.withTypeProvider<ZodTypeProvider>().post( '/person', { schema: { body: z.object({ a: z.string() }), response: { '2xx': z.object({ b: z.string() }).strict() }, }, }, function (request, reply) { console.log(request.body.a); // Typed return { b: '9', c: 1 }; // Typed but accepts c } );
res.send()/reply.send() method works fine. i recommend using it.
res.send()
reply.send()
Thank you sir!
Same problem still
I tried with
strict()
and withoutstrict()
. Anyone can help?