Menu

#22 chore(deps): bump @nestjs/swagger from 8.1.1 to 12.0.1

open
nobody
1 day ago
2026-08-27
Anonymous
No

Originally created by: dependabot[bot]

Bumps @nestjs/swagger from 8.1.1 to 12.0.1.

Release notes

Sourced from @​nestjs/swagger's releases.

Release 12.0.1

12.0.1 (2026-08-28)

Bug fixes

Dependencies

Committers: 1

Release 12.0.0

What's Changed

@nestjs/swagger is now a native ES module, requires Nest 12, and changes how nullable schemas are spelled in the generated document.

ESM migration

The package is published as pure ESM ("type": "module", compiled with NodeNext) behind a proper exports map. The legacy root index.ts / plugin.js / plugin.ts shims are gone, and deep imports into build internals are no longer resolvable — import from the package root (@nestjs/swagger) or from @nestjs/swagger/plugin.

require(esm) — CommonJS still works

You do not need to convert your app to ESM. Thanks to Node's require(esm) support, a CommonJS app can keep doing const { SwaggerModule } = require('@nestjs/swagger'). The CLI plugin entry (@nestjs/swagger/plugin) also keeps a require condition so nest-cli.json setups load it unchanged.

This is why the package now declares "engines": { "node": "^20.19.0 || >=22.12.0" } — those are the Node versions where require(esm) is available without a flag.

Nest 12 peer dependencies

@nestjs/common and @nestjs/core peers are now ^12.0.0. @nestjs/mapped-types moves to 12.0.0 (itself ESM, with its major aligned to the Nest 12 line), so PartialType, PickType, OmitType and IntersectionType come from an ESM build too.

Standard Schema support

Schemas passed to Nest 12's route decorators (for example @Body({ schema: z.object({ ... }) })) can now be reflected into the OpenAPI document. Supply an adapter via the new standardSchemaConverter document option:

import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import type { SwaggerDocumentOptions } from '@nestjs/swagger';
import { createSchema } from 'zod-openapi';
import type { ZodType } from 'zod';

// Standard Schema exposes the producing library under ~standard.vendor, // which is how you narrow the raw value to a library-specific type. function isZodSchema(schema: unknown): schema is ZodType { return ( !!schema && typeof schema === 'object' && (schema as { '~standard'?: { vendor?: string } })['~standard']?.vendor === 'zod' ); </tr></table>

... (truncated)

Commits
Install script changes

This version adds prepare script that runs during installation. Review the package contents before updating.


Related

Tickets: #14

Discussion


Log in to post a comment.