Skip to content

v2.0.0! Zod validation and Swagger docs πŸ₯³πŸŽŠ

Choose a tag to compare

@JamieCurnow JamieCurnow released this 26 Jul 12:46
· 11 commits to main since this release

#[Breaking changes]
We're now using Zod for validation instead of Joi. Joi is no longer supported - update your validation function to now return a Zod validation object for the body/params/etc.

validate: (zod) => ({
  body: zod.object({ something: zod.boolean() })
})

Swagger

See docs in README.

Commits

  • update the tests 3c1d78d
  • put version back to use auto versioning from np da9528c
  • add to docs, update type descriptions, expose zod out of the swaggerZod function. 304a458
  • Merge pull request #4 from JamieCurnow/2-implement-swagger-docs-object-using-swagger-zod 0e3043d
  • Added openapi extended zod to the validate method Added examples to validate method Added route meta info to the swaggerZod function c0346ba
  • Zod swagger docs now working 😎 New swaggerZod metod exposed to routes with the definition ready to register routes and schemas to 83e4faf
  • Merge pull request #3 from JamieCurnow/1-implement-zod-for-validation edf5169
  • Implemented zod vaildation for routes Removed express-validation + joi packages a86b1c5

v1.0.1...v2.0.0

Contributors:

Ben Short @kensington133
Jamie Curnow @JamieCurnow