This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Firstly you need to set the validator and serializer compiler to the one included in the fastify-type-provider-zod module. (https://fastify.dev/docs/latest/Reference/Validation-and-Serialization/#validation-and-serialization) | |
// This can be done like: | |
import { | |
serializerCompiler, | |
validatorCompiler | |
} from 'fastify-type-provider-zod'; | |
fastify | |
.setValidatorCompiler(validatorCompiler) | |
.setSerializerCompiler(serializerCompiler); |