nest-rest
Implements the REST API layer of a use case (UC-XXX) in a NestJS application: thin @Controller classes on top of the service layer, class-validator request DTOs under a global ValidationPipe, plain response types that never leak a database row, one exception filter mapping domain errors to RFC 9457 Problem Details, a status code per alternative flow, and paging. Takes the base path and contract style from the API contract section of docs/architecture/stack.md, builds an operation the use case's **API:** line links in an agreed OpenAPI contract exactly as written, and holds no business rule the service does not enforce. Use when the user asks to "build the REST API", "create an endpoint", "expose the use case over HTTP", "add a controller", or mentions NestJS controllers, DTOs, class-validator, ValidationPipe, exception filters, or a JSON contract for a separate client such as Next.js. Normally run by /use-case-implement after the service layer; it can also be run directly.
Pinned to revision 648476b42261, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/nest-rest/SKILL.md
- skills/nest-rest/references/layer.md
- skills/nest-rest/references/markers.md
- skills/nest-rest/references/worked-example.md
Every link opens the file at its source, pinned to the revision this page describes.