unstale

npm / @nestjs/swagger

@nestjs/swagger

What changed in @nestjs/swagger 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

9 breaking3 new APIs and options8 fixes and other

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

npx @unstale/cli init

@unstale/cli on npm

@nestjs/swagger 1220 changes

Breaking changes 9

  • The CLI plugin now detects esmCompatible per source file from package.json type and the module setting when the option is unset; an explicit nest-cli.json value still wins.

    12.0.0release notes

  • lodash is no longer a runtime dependency; this affects projects that relied on it arriving transitively.

    12.0.0release notes

  • The peer dependency range is now ^12.0.0, so projects using @nestjs/swagger must align with Nest 12.

    12.0.0release notes

  • The peer dependency range is now ^12.0.0, so projects using @nestjs/swagger must align with Nest 12.

    12.0.0release notes

  • The package moves to 12.0.0 and its mapped-type helpers come from an ESM build aligned with the Nest 12 line.

    12.0.0release notes

  • The package is published as pure ESM with an exports map; import from the package root or @nestjs/swagger/plugin, because deep imports into build internals are no longer resolvable.

    12.0.0release notes

  • The package requires Node ^20.19.0 or >=22.12.0, where require(esm) is available without a flag.

    12.0.0release notes

  • For OpenAPI 3.1.0 and later, nullable schemas are normalized without the nullable keyword: typed schemas use a type union, enums gain null, and references and composites use anyOf.

    12.0.0release notes

  • For OpenAPI 3.0.x, nullable responses use the nullable keyword again, with the allOf wrapper for references, instead of oneOf with a null schema.

    12.0.0release notes

New APIs and options 3

  • Support is added for the HTTP QUERY method (RFC 10008).

    12.0.2release notes

  • With introspectComments enabled, JSDoc @param tags matched by route-parameter name set descriptions on generated @ApiQuery or @ApiParam decorators; existing explicit decorators are untouched.

    12.0.0release notes

  • This new document option converts Standard Schema values into OpenAPI schemas, can register extra components, and falls back to the DTO-derived schema when it returns undefined.

    12.0.0release notes

Fixes and other changes 8

  • Standard schema query parameters are merged with @ApiQuery.

    12.0.2release notes

  • The package is resolved through a bundler-visible dynamic import.

    12.0.2release notes

  • A standard-schema description is promoted to the parameter object.

    12.0.2release notes

  • The plugin treats single literal types as enums.

    12.0.2release notes

  • The generated file preserves $ characters when it is built.

    12.0.2release notes

  • TypeScript is declared as an optional peer dependency.

    12.0.2release notes

  • The plugin keeps the source package specifier for workspace imports.

    12.0.2release notes

  • Fixes hoisting of static imports in ESM.

    12.0.1release notes