# What changed in @nestjs/swagger

> 20 changes in @nestjs/swagger 12 from its official release notes, upgrade guides and advisories: 9 breaking, 3 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/@nestjs/swagger/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @nestjs/swagger 12

### Breaking changes

- 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.0) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.0)
- lodash is no longer a runtime dependency; this affects projects that relied on it arriving transitively. (12.0.0) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.0)
- The peer dependency range is now ^12.0.0, so projects using @nestjs/swagger must align with Nest 12. (12.0.0) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.0)
- The peer dependency range is now ^12.0.0, so projects using @nestjs/swagger must align with Nest 12. (12.0.0) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.0)
- 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.0) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.0)
- 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.0) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.0)
- The package requires Node ^20.19.0 or >=22.12.0, where require(esm) is available without a flag. (12.0.0) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.0)
- 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.0) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.0)
- 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.0) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.0)

### New APIs and options

- Support is added for the HTTP QUERY method (RFC 10008). (12.0.2) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.2)
- 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.0) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.0)
- 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.0) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.0)

### Fixes and other changes

- Standard schema query parameters are merged with @ApiQuery. (12.0.2) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.2)
- The package is resolved through a bundler-visible dynamic import. (12.0.2) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.2)
- A standard-schema description is promoted to the parameter object. (12.0.2) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.2)
- The plugin treats single literal types as enums. (12.0.2) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.2)
- The generated file preserves $ characters when it is built. (12.0.2) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.2)
- TypeScript is declared as an optional peer dependency. (12.0.2) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.2)
- The plugin keeps the source package specifier for workspace imports. (12.0.2) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.2)
- Fixes hoisting of static imports in ESM. (12.0.1) — [release notes](https://github.com/nestjs/swagger/releases/tag/12.0.1)
