Releases: samchungy/zod-openapi
v2.12.0
What's Changed
New Features 🎉
- Duplicate description on schemas used in parameters by @samchungy in #200
- Support ZodNever and ZodUndefined by @samchungy in #202
Other Changes
- Bump openapi3-ts from 4.1.2 to 4.2.1 by @dependabot in #197
- Update ZodTransform
effectType
error messages by @samchungy in #203
New Contributors
Full Changelog: v2.11.0...v2.12.0
v2.11.0
What's Changed
New Features 🎉
-
Fix Nullable Behaviour by @samchungy in #187
.nullable()
now renders differently for OpenAPI < 3.1.0Previously a registered schema which was made nullable would render as:
{ oneOf: [ { $ref: '#/components/schemas/a' }, { nullable: true } ] }
will now be rendered as:
{ allOf: [ { $ref: '#/components/schemas/a' } ], nullable: true }
Similarly with nullable unions
{ anyOf: [ { $ref: '#/components/schemas/a' }, { $ref: '#/components/schemas/b' }, { nullable: true } ] }
Will now be rendered as:
{ anyOf: [ { $ref: '#/components/schemas/a' }, { $ref: '#/components/schemas/b' } ], nullable: true }
Full Changelog: v2.10.0...v2.11.0
v2.10.0
What's Changed
New Features 🎉
-
Add unionOneOf by @samchungy in #184
You can now use
unionOneOf
to override the output of a ZodUnion to be aoneOf
schema instead ofallOf
(default). Previously rendering an oneOf schema was only possible with a ZodDiscriminatedUnion. -
Bundle Package with esbuild by @samchungy in #178
This should result in no changes to the public API, however, if you were previously reaching into the package paths internally you will now see an error.
Full Changelog: v2.9.1...v2.10.0
v2.10.0-beta.1
What's Changed
New Features 🎉
-
Bundle Package with esbuild by @samchungy in #178
This should result in no changes to the public API, however, if you were previously reaching into the internal files you will now see an error.
Full Changelog: v2.9.1...v2.10.0-beta.1
v2.9.1
What's Changed
Other Changes
-
fix: default should be nonoptional in output state by @tomwwright in #175
When
.default()
is used on a ZodObject property field in a response schema, it is now correctly reflected as a required field.
New Contributors
- @tomwwright made their first contribution in #175
Full Changelog: v2.9.0...v2.9.1
v2.9.0
What's Changed
New Features 🎉
- Handle
.startsWith()
,.endsWith()
,.includes()
and multiple string patterns by @samchungy in #164
Other Changes
- Eslint type tweaks by @dependabot in #161
Full Changelog: v2.8.0...v2.9.0
v2.9.0-beta.0
What's Changed
New Features 🎉
- Handle
.startsWith()
,.endsWith()
,.includes()
and multiple string patterns by @samchungy in #164
Other Changes
- Eslint type tweaks by @dependabot in #161
Full Changelog: v2.8.0...v2.9.0-beta.0
v2.8.0
What's Changed
New Features 🎉
- Support ZodReadonly by @samchungy in #159
Other Changes
- Add stricter typing to Zod Type check by @samchungy in #152
Full Changelog: v2.7.4...v2.8.0
v2.7.4
What's Changed
Other Changes
- Avoid instanceof checks and rely on typeName by @samchungy in #150
Full Changelog: v2.7.3...v2.7.4
v2.7.3
What's Changed
Other Changes
-
Fix
effectType
regression error by @samchungy in #147Fixes a bug introduced in 2.7.2 where ZodEffects would throw errors around
effectType
even if they were not used in components.
Full Changelog: v2.7.2...v2.7.3