Guides
Support Matrix
What nestjs-openapi supports today: routing decorators, parameters, request bodies, responses, security and versioning, with notes on each.
A concise view of what the generator reads today. For details, see the full Decorators Guide.
| Feature | Status | Notes |
|---|
@Controller('path'), @Controller([...]) | Supported | Also @Controller({ path, version }); path arrays document every path |
| HTTP method decorators | Supported | @Get, @Post, @Put, @Patch, @Delete, @Options, @Head; path arrays too |
@All() | Supported | One operation per HTTP method, operationIds <Controller>_<method>_<verb>, like Nest |
@Version(), VERSION_NEUTRAL | Supported | With versioning; URI versions in paths and operationIds |
@HttpCode() | Supported | Default success status |
| Decorator | Status | Notes |
|---|
@Param() | Supported | Path parameters |
@Query() | Supported | Query params; DTOs are expanded, with their @ApiProperty metadata |
@Body() | Supported | Request body |
@Headers() | Supported | Header parameters |
@ApiQuery, @ApiParam | Supported | Method and controller level; every option; params missing from the signature are added |
@ApiHeader, @ApiHeaders | Supported | Method and controller level |
@ApiQuery({ type: Dto }) | Supported | Expanded into the DTO's properties |
| Decorator | Status | Notes |
|---|
@ApiTags | Supported | Controller and method level, merged |
@ApiOperation | Supported | Summary, description, operationId, deprecated |
@ApiBody | Supported | type, isArray, schema, description, required |
@ApiResponse | Supported | type, isArray, schema, description; no status means default |
@ApiExcludeEndpoint | Supported | Also through wrappers |
@ApiExcludeController | Supported | Every method of the controller |
@ApiConsumes, @ApiProduces | Supported | Controller and method level |
@ApiExtension | Supported | Method level, and controller level for all its methods |
@ApiExtraModels | Supported | Controller and method level |
| Decorator | Status | Notes |
|---|
@ApiOkResponse, @ApiNotFoundResponse, @ApiDefaultResponse, etc. | Supported | Every status shortcut @nestjs/swagger exports; controller and method level |
| Decorator | Status | Notes |
|---|
@ApiProperty | Supported | Every option; a declared type, enum, items or oneOf/anyOf/allOf wins over the TypeScript type |
@ApiPropertyOptional | Supported | Removes the property from required |
@ApiHideProperty | Supported | Removes the property |
enum + enumName | Supported | A named component; enumName sets its name. Inline values with enums: 'nest' |
| Helper | Status | Notes |
|---|
PartialType | Supported | Every property optional |
PickType | Supported | |
OmitType | Supported | |
IntersectionType | Supported | Helpers can be nested |
| Kind | Status | Notes |
|---|
applyDecorators() wrappers in your code | Supported | Followed automatically, including their arguments |
| Wrappers that cannot be followed | Supported | Describe them with the decorators option |
| Decorator | Status | Notes |
|---|
@ApiBearerAuth | Supported | Controller and method level; scheme in config |
@ApiBasicAuth | Supported | Controller and method level; scheme in config |
@ApiOAuth2 | Supported | Controller and method level; scheme in config |
@ApiSecurity | Supported | Controller and method level; scheme in config |
@ApiCookieAuth | Supported | Controller and method level; scheme in config |
| Source | Status | Notes |
|---|
| TypeScript types | Supported | Primary source of truth |
| JSDoc tags | Supported | Descriptions and constraints |
@ApiProperty metadata | Supported | Read wherever the class is declared |
| class-validator decorators | Supported | Requires extractValidation: true (default) |
| Same-named declarations | Supported | Resolved by symbol; see schemaNameCollision |
| Decorator arguments | Supported | Literals, constants, enum members, + concatenation, template literals, as const, Object.values/keys/entries, array filter/map/concat/slice, new Set |
| Feature | Status | Notes |
|---|
| OpenAPI 3.0.3 | Supported | Validated against the official schema in tests |
| OpenAPI 3.1 / 3.2 | Supported | null in types, $ref with sibling keywords, examples arrays |
| Path rewriting | Supported | transformPath |
| Extensions from your own decorators | Supported | operationExtensions |
| OpenAPI Overlay 1.0 | Supported | overlay: update and remove, applied in order |
These are deliberate:
-
Enums are named components by default; @nestjs/swagger writes them in place unless enumName is set (enums: 'nest').
-
A success response is inferred from the return type unless a 2xx response is declared; @nestjs/swagger documents only what decorators declare.
-
@ApiExtension on a controller applies to its methods; @nestjs/swagger ignores it there.
-
@All() documents the seven standard HTTP methods; @nestjs/swagger also emits the non-standard search.
-
Dynamic route registration at runtime cannot be seen statically.