Skip to content

Releases: turkerdev/fastify-type-provider-zod

6.0.0

01 Sep 09:00
3db3fa1

Choose a tag to compare

  • Significantly improved compatibility with OpenAPI 3.0 for specification document population;
  • Automatically switch between OpenAPI 3.0 and 3.1 modes based on the version in the openapi field of the specification document root.

5.0.1

09 Jun 19:53

Choose a tag to compare

  • Fix exports

5.0.0

08 Jun 13:00

Choose a tag to compare

Breaking changes

  • Switch to zod v4 API;
  • Error response structure revised to reduce duplication

4.0.1

30 Sep 08:45

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

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

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

Choose a tag to compare

  • Export class for ResponseValidationError
  • Support refs (#99)

2.0.0

25 Jun 12:44

Choose a tag to compare

  • Node 16+ is now expected (although 14 may still work)
  • Structure of ResponseValidationError has changed