Skip to content

Releases: turkerdev/fastify-type-provider-zod

4.0.1

30 Sep 08:45
Compare
Choose a tag to compare

Fixes

  • No longer leak internal fields within the error structure during serialization.

4.0.0

29 Sep 21:56
accc50a
Compare
Choose a tag to compare

Breaking changes

  • Structure of thrown validation errors has changed, see #115

New features

  • There are new type guards available - hasZodFastifySchemaValidationErrors and isResponseSerializationError, 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

25 Sep 14:51
Compare
Choose a tag to compare

Breaking changes

  • Fastify 5 is now required
  • ResponseValidationError was replaced by ResponseSerializationError: #110
  • Request or response schema validation no longer throws a ZodError. Instead, either ResponseSerializationError or FastifyError 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!

2.1.0

24 Sep 12:17
Compare
Choose a tag to compare
  • Export class for ResponseValidationError
  • Support refs (#99)

2.0.0

25 Jun 12:44
Compare
Choose a tag to compare
  • Node 16+ is now expected (although 14 may still work)
  • Structure of ResponseValidationError has changed