unstale

npm / nestjs-zod

nestjs-zod

What changed in nestjs-zod 3 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.

9 breaking4 deprecations12 new APIs and options27 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.1 on npm

nestjs-zod 549 changes

Breaking changes 7

  • Adds a check to ensure @Res() is not used without passthrough: true.

    5.5.0release notes

  • OpenAPI 3.0 schemas no longer include id.

    5.3.0release notes

  • Uses deepObject style by default for object query params.

    5.1.0release notes

  • Replaces patchNestJsSwagger.

    5.0.0release notes

  • Now returns unknown.

    5.0.0release notes

  • Removes patchNestJsSwagger and replaces it with cleanupOpenApiDoc.

    5.0.0release notes

  • No longer receives special handling in OpenAPI generation.

    5.0.0release notes

Deprecations 4

New APIs and options 11

Fixes and other changes 27

  • Replaced deepmerge with internal helpers in response to CVE-2026-93753.

    5.6.0release notes

  • Fixed a bug involving duplicate schemas.

    5.6.0release notes

  • Fixed unions generating incorrect OpenAPI documentation with the latest Zod.

    5.6.0release notes

  • Fixes a bug with named schemas when using zod ≥ 4.4.

    5.5.0release notes

  • Cleans up parent-metadata and parent-additional-properties from query params.

    5.5.0release notes

  • Nullable enums include null in the enum array when generating OpenAPI 3.0.

    5.4.0release notes

  • Converts exclusiveMaximum for OpenAPI 3.0.

    5.4.0release notes

  • Converts exclusiveMinimum for OpenAPI 3.0.

    5.4.0release notes

  • Converts propertyNames for OpenAPI 3.0.

    5.4.0release notes

  • Optional object properties are removed from the required array when using @nestjs/swagger v7.

    5.4.0release notes

  • Removes the prefix from parameter schemas for strict objects.

    5.4.0release notes

  • Fixes broken deep imports, so developers can use deep import paths reliably.

    5.3.0release notes

  • Fixes handling of defs refs inside propertyNames.

    5.2.1release notes

  • Copies all root schema metadata.

    5.2.1release notes

  • OpenAPI 3.0 const conversion now handles falsy literals, including 0, false, and the empty string.

    5.2.0release notes

  • Fixes id handling for array schemas.

    5.2.0release notes

  • Fixes cases where nullable was not converted correctly.

    5.2.0release notes

  • Nullable $ref values are now handled validly for OpenAPI 3.0 by using allOf.

    5.2.0release notes

  • Fixes title handling for array schemas.

    5.2.0release notes

  • Restores the /dto entry point for importing DTO functionality.

    5.1.1release notes

  • Adds an ESM entry point to resolve the globalRegistry mismatch.

    5.1.0release notes

  • Fixes errors with nested named schemas.

    5.1.0release notes

  • Uses enum instead of const for OpenAPI 3.0.

    5.1.0release notes

  • Fixes handling of optional nested query params.

    5.1.0release notes

  • Fixes serialization being skipped when a primitive is returned.

    5.1.0release notes

  • Fixes missing OpenAPI documentation when a DTO is used for query params.

    5.0.0release notes

  • Fixes unexpected array behavior.

    5.0.0release notes

nestjs-zod 41 changes

Breaking changes 1

  • Extended Zod was split into the separate @nest-zod/z package.

    4.0.0release notes

nestjs-zod 32 changes

Breaking changes 1

  • ZodSerializerInterceptor now returns a 500 error status instead of 400.

    3.0.0release notes

New APIs and options 1

  • Support was added for Zod native string date-time.

    3.0.0release notes