Releases: asteasolutions/zod-to-openapi
v7.0.0
What's Changed
- Added ESM modules export alongside the already present CJS (#219)
- Added support for
.refine()
and.transform
on ZodObjects in request query/params/headers/cookies (#198)
BREAKING CHANGES ⚠️
❗ None of the changes that we've made are breaking in terms of code integration but their behavior (result) is changed:
Handle zod tuples with prefixItems for OpenAPI v3.1.0 (#221 )
As of OpenAPI v3.1.0 there is a better representation of tuples - ordered items with the use of the prefixItems
keyword. See more here
BigInt is now transformed as type string
z.bigint() // this is now transformed to `{ type: 'string', pattern: "^\d+$' }` instead of an `'integer'` type.
A BigInt can represent a number with a arbitrary size and that also means numbers that do not fall in the int64
format. As such for a library based on the JS world it is safer to represent a z.bigint()
instance as a string containing only digits. In a real life scenario a BigInt
instance can only be created from whatever was passed through HTTPS - and that can be both number and string as a basis.
Along with that the support for the minimum and maximum values have been removed.
Full Changelog: v6.4.0...v7.0.0
v6.4.0
v6.3.1
v6.3.0
v6.2.0
v6.1.0
v6.0.0
What's Changed
- [BREAKING] Remove
openapi3-ts
exports since they break some applications but were never exported as a feature but rather for convenience. If they are needed one can simply add a dependency onopenapi3-ts
itslef
Full Changelog: v5.5.0...v6.0.0
v5.5.0
What's Changed
- Combine manually passed parameters from
config.parameters
with the generated ones fromconfig.request
Full Changelog: v5.4.0...v5.5.0
v5.4.0
What's Changed
- Added support for cookies in RouteConfig.request object
Full Changelog: v5.3.1...v5.4.0