Logonestjs-openapi
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.

Routing

FeatureStatusNotes
@Controller('path'), @Controller([...])SupportedAlso @Controller({ path, version }); path arrays document every path
HTTP method decoratorsSupported@Get, @Post, @Put, @Patch, @Delete, @Options, @Head; path arrays too
@All()SupportedOne operation per HTTP method, operationIds <Controller>_<method>_<verb>, like Nest
@Version(), VERSION_NEUTRALSupportedWith versioning; URI versions in paths and operationIds
@HttpCode()SupportedDefault success status

Parameters

DecoratorStatusNotes
@Param()SupportedPath parameters
@Query()SupportedQuery params; DTOs are expanded, with their @ApiProperty metadata
@Body()SupportedRequest body
@Headers()SupportedHeader parameters
@ApiQuery, @ApiParamSupportedMethod and controller level; every option; params missing from the signature are added
@ApiHeader, @ApiHeadersSupportedMethod and controller level
@ApiQuery({ type: Dto })SupportedExpanded into the DTO's properties

Swagger Operation Decorators

DecoratorStatusNotes
@ApiTagsSupportedController and method level, merged
@ApiOperationSupportedSummary, description, operationId, deprecated
@ApiBodySupportedtype, isArray, schema, description, required
@ApiResponseSupportedtype, isArray, schema, description; no status means default
@ApiExcludeEndpointSupportedAlso through wrappers
@ApiExcludeControllerSupportedEvery method of the controller
@ApiConsumes, @ApiProducesSupportedController and method level
@ApiExtensionSupportedMethod level, and controller level for all its methods
@ApiExtraModelsSupportedController and method level

Response Shortcuts

DecoratorStatusNotes
@ApiOkResponse, @ApiNotFoundResponse, @ApiDefaultResponse, etc.SupportedEvery status shortcut @nestjs/swagger exports; controller and method level

Property Decorators

DecoratorStatusNotes
@ApiPropertySupportedEvery option; a declared type, enum, items or oneOf/anyOf/allOf wins over the TypeScript type
@ApiPropertyOptionalSupportedRemoves the property from required
@ApiHidePropertySupportedRemoves the property
enum + enumNameSupportedA named component; enumName sets its name. Inline values with enums: 'nest'

Mapped Types

HelperStatusNotes
PartialTypeSupportedEvery property optional
PickTypeSupported
OmitTypeSupported
IntersectionTypeSupportedHelpers can be nested

Custom Decorators

KindStatusNotes
applyDecorators() wrappers in your codeSupportedFollowed automatically, including their arguments
Wrappers that cannot be followedSupportedDescribe them with the decorators option

Security

DecoratorStatusNotes
@ApiBearerAuthSupportedController and method level; scheme in config
@ApiBasicAuthSupportedController and method level; scheme in config
@ApiOAuth2SupportedController and method level; scheme in config
@ApiSecuritySupportedController and method level; scheme in config
@ApiCookieAuthSupportedController and method level; scheme in config

DTO Schema Generation

SourceStatusNotes
TypeScript typesSupportedPrimary source of truth
JSDoc tagsSupportedDescriptions and constraints
@ApiProperty metadataSupportedRead wherever the class is declared
class-validator decoratorsSupportedRequires extractValidation: true (default)
Same-named declarationsSupportedResolved by symbol; see schemaNameCollision
Decorator argumentsSupportedLiterals, constants, enum members, + concatenation, template literals, as const, Object.values/keys/entries, array filter/map/concat/slice, new Set

Output

FeatureStatusNotes
OpenAPI 3.0.3SupportedValidated against the official schema in tests
OpenAPI 3.1 / 3.2Supportednull in types, $ref with sibling keywords, examples arrays
Path rewritingSupportedtransformPath
Extensions from your own decoratorsSupportedoperationExtensions
OpenAPI Overlay 1.0Supportedoverlay: update and remove, applied in order

Differences from @nestjs/swagger

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.

Next Steps

On this page