Releases: turkerdev/fastify-type-provider-zod
Releases · turkerdev/fastify-type-provider-zod
4.0.1
4.0.0
Breaking changes
- Structure of thrown validation errors has changed, see #115
New features
- There are new type guards available -
hasZodFastifySchemaValidationErrors
andisResponseSerializationError
, for handling request and response validation errors, accordingly. See README.md section "Customizing error responses" for examples of how these can be used.
3.0.0
Breaking changes
- Fastify 5 is now required
- ResponseValidationError was replaced by ResponseSerializationError: #110
- Request or response schema validation no longer throws a
ZodError
. Instead, eitherResponseSerializationError
orFastifyError
are thrown. You may need to adjust your fastify error handler in case you were relying on the previous behaviour for handling responses to invalid request payload. Note that version 4.0.0 will slightly change the structure of these errors and also will expose the convenience type guards for handling them.
New features
- It is possible to customize
replacer
for serializerCompiler now: #112
This release was possible due to the efforts of @Bram-dc. Thank you so much for your help!