nestjs-swagger-docs
CommunityStreamline NestJS Swagger/OpenAPI documentation with best practices.
AuthorKapilKumar88
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill unit ensures that NestJS controllers and endpoints are documented with best practices, improving consistency and reducing errors in Swagger/OpenAPI annotations.
Core Features & Use Cases
- Best Practices Guide: Provides guidelines for @ApiResponse decorators, Swagger schema examples, and shared error response decorators.
- Real-time Response Validation: Ensures documented response shapes match actual runtime output.
- Shared Error Decorators: Encourages reusability and standardization of error responses across endpoints.
- Quick Documentation Procedures: Offers step-by-step guidance for documenting new endpoints and updating existing ones.
- Decorator Order Convention: Suggests an order for API decorators to maintain clarity and consistency.
Quick Start
To document a new endpoint, follow these steps:
- Read the service method to understand the return type and fields.
- Write the 200
@ApiResponsewith aschema.exampleincluding the fullApiResponseDtoenvelope and alldatafields. - Add endpoint-specific non-2xx codes with
schema.example. - Apply the shared error decorator as the last decorator before the method.
- Verify the
@ApiTagsclass decorator exists and the tag is registered inmain.ts.
Dependency Matrix
Required Modules
None requiredComponents
scriptsreferences
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: nestjs-swagger-docs Download link: https://github.com/KapilKumar88/ai-workspace-platform/archive/main.zip#nestjs-swagger-docs Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.