api-designer

Designs REST API endpoints with DTOs, Swagger decorators, and Bruno collections.

Updated Oct 2, 2025
One-click install
npx skills add https://github.com/YuriiYInno/Innogram --skill api-designer-yuriiyinno
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api-designer
Source: https://github.com/YuriiYInno/Innogram/tree/main/.codex/skills/api-designer
Command: npx skills add https://github.com/YuriiYInno/Innogram --skill api-designer-yuriiyinno

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Designing consistent REST APIs requires repetitive decisions about URL naming, HTTP methods, status codes, DTO validation, and documentation. This Skill standardizes that process by generating endpoint designs, DTOs, and Swagger specifications that follow established conventions. ## Core Features & Use Cases - REST Convention Templates: Provides standard URL naming patterns, HTTP method mappings, and error response structures for CRUD and nested resources. - DTO and Swagger Generation: Creates request, update, and response DTOs with class-validator rules and NestJS Swagger decorators for controllers. - Living Specification Updates: Maintains an incremental api-designer-spec.md document organized by task number and module, keeping API documentation synchronized with the project. - Use Case: When adding a new authentication feature, use this Skill to design the login and registration endpoints with validated DTOs, documented status codes, and Swagger annotations before implementation begins. ## Quick Start Ask the AI to design the REST API endpoints for user authentication including DTOs and Swagger documentation.

Frequently Asked Questions about api-designer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design REST API endpoints with proper conventions?▼

Use plural nouns for resources (GET /users, POST /users), nest related resources (/users/:id/posts), and use verbs only for non-CRUD actions (/orders/:id/cancel). Map methods to status codes: 200 for reads, 201 for creation, 204 for deletion.

How to create DTOs with validation in NestJS?▼

Create DTO classes using class-validator decorators like @IsEmail, @IsNotEmpty, and @MaxLength for validation rules. Combine them with @ApiProperty from @nestjs/swagger so validation and documentation stay synchronized in one definition.

What Swagger decorators does NestJS use for API documentation?▼

NestJS uses @ApiTags at the controller level, plus @ApiOperation, @ApiResponse, @ApiParam, @ApiQuery, and @ApiBody at the endpoint level. These decorators generate OpenAPI documentation automatically from your controller code.

How do I prevent exposing sensitive fields in API responses?▼

Use the @Exclude() decorator from class-transformer on sensitive fields like passwords in response DTOs. Combine with @Expose() on safe fields and a static fromEntity method to control exactly what data leaves the API.

When should I use PUT versus PATCH for updates?▼

Use PUT for full resource updates where all fields are replaced, and PATCH for partial updates where only provided fields change. For PATCH DTOs, use PartialType from @nestjs/swagger to make all fields optional automatically.