nestjs-documentation
Installation
SKILL.md
OpenAPI & Documentation
Priority: P2 (MAINTENANCE)
Workflow
- Enable Swagger plugin in
nest-cli.jsonto auto-generate@ApiPropertyfrom DTOs. - Annotate controllers with
@ApiTags,@ApiResponse, and auth decorators. - Create generic wrappers for paginated and polymorphic responses.
- Generate separate docs for public vs internal audiences.
Setup
See implementation examples for nest-cli.json plugin config and Swagger bootstrap.
Response Documentation
- Strictness: Every controller method must
@ApiResponse({ status: 200, type: UserDto }). - Generic Wrappers: Define
ApiPaginatedResponse<T>decorators usingApiExtraModels+getSchemaPath()to handle generics properly.