Skip to content

Releases: samchungy/zod-openapi

zod-openapi@5.4.6

05 Jan 05:03
c816c97

Choose a tag to compare

Patch Changes

  • #568 a89830a Thanks @samchungy! - Address Zod 4.3+ "cannot be represented in OpenAPI" compatibility issues

zod-openapi@5.4.5

27 Nov 12:26
b8aa311

Choose a tag to compare

Patch Changes

zod-openapi@5.4.4

27 Nov 02:16
c3e0aa4

Choose a tag to compare

Patch Changes

  • #556 2f8db8a Thanks @samchungy! - Fix crash when generating discriminated union schemas with Zod 4.1.13+

zod-openapi@5.4.3

08 Oct 12:45
a93d2ec

Choose a tag to compare

Patch Changes

zod-openapi@5.4.2

28 Sep 01:11
732ccb6

Choose a tag to compare

Patch Changes

zod-openapi@5.4.1

09 Sep 12:19
dd6c05e

Choose a tag to compare

Patch Changes

zod-openapi@5.4.0

25 Aug 01:21
b91cc3b

Choose a tag to compare

Minor Changes

zod-openapi@5.3.1

09 Aug 02:04
b681d1e

Choose a tag to compare

Patch Changes

zod-openapi@5.3.0

26 Jul 08:04
1076ad6

Choose a tag to compare

Minor Changes

  • c43d544 Thanks @samchungy! - Remove zodSchemas from meta override

    This should result in faster type inference when using .meta().

    zodSchemas is still available in the CreateDocumentOptions override function.

    The mis-scoped Override type is now exported as ZodOpenApiOverride and ZodOpenApiOverrideMeta

Patch Changes

v5.2.0

15 Jul 06:08
f366da0

Choose a tag to compare

Minor Changes

  • #480 5c3f98a Thanks @samchungy! - Change ZodUndefined behaviour

    This 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 override function passed into the createDocument function.

    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;
          }
        },
      },
    );