Releases: samchungy/zod-openapi
Releases · samchungy/zod-openapi
[email protected]
Patch Changes
- #541
fbdc363Thanks @dependabot! - Resolve error TS2304: Cannot find name 'oas31_d_exports'.
[email protected]
Patch Changes
- #535
1bdce13Thanks @samchungy! - Fix component generation in OpenAPI 3.0.0
[email protected]
[email protected]
Minor Changes
- #510
dea9dbcThanks @samchungy! - Re-introduce support for OpenAPI 3.x. This requires Zod ^4.1.0
[email protected]
Patch Changes
4b88330Thanks @samchungy! - Fix manual component registration
[email protected]
Minor Changes
-
c43d544Thanks @samchungy! - RemovezodSchemasfrom metaoverrideThis should result in faster type inference when using
.meta().zodSchemasis still available in theCreateDocumentOptionsoverridefunction.The mis-scoped
Overridetype is now exported asZodOpenApiOverrideandZodOpenApiOverrideMeta
Patch Changes
- #484
8ae543fThanks @samchungy! - Switch to ESM
v5.2.0
Minor Changes
-
#480
5c3f98aThanks @samchungy! - ChangeZodUndefinedbehaviourThis restores how
z.undefined()is rendered to pre Zod v3.25.75.It is now rendered as:
{ "not": {} }If you want to override this behaviour you can customise this with the
overridefunction passed into thecreateDocumentfunction.eg.
import { createDocument } from 'zod-openapi'; createDocument( z.object({ name: z.undefined().optional(), }), { override: (ctx) => { if (ctx.zodSchema._zod.def.type === 'undefined') { // This will change the behaviour back to throwing an error delete ctx.jsonSchema.not; } }, }, );