Skip to content

Releases: samchungy/zod-openapi

[email protected]

08 Oct 12:45
a93d2ec

Choose a tag to compare

Patch Changes

[email protected]

28 Sep 01:11
732ccb6

Choose a tag to compare

Patch Changes

[email protected]

09 Sep 12:19
dd6c05e

Choose a tag to compare

Patch Changes

[email protected]

25 Aug 01:21
b91cc3b

Choose a tag to compare

Minor Changes

[email protected]

09 Aug 02:04
b681d1e

Choose a tag to compare

Patch Changes

[email protected]

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

v5.1.1

15 Jul 01:13
aafaacc

Choose a tag to compare

Patch Changes

  • 779d22b: Fix ZodAny and ZodUnknown optionals

v5.1.0

10 Jul 00:39
3ba3ea5

Choose a tag to compare

Minor Changes

  • bfc5754: Allow peer versions of zod: ^4.0.0

  • bfc5754: Expose path in override hook

    This provides context of where the override is being applied, which can be useful when throwing errors

v5.0.1

07 Jul 03:15
3ae069e

Choose a tag to compare

Patch Changes

  • d71fe72: Preserve non Zod schemas