Requirements
| Package | Role |
|---|---|
next | Peer dependency — App Router only. |
react | Peer dependency (matches Next.js's own requirement). |
class-validator, class-transformer | Required for @Body() DTO validation. |
class-validator-jsonschema | Required only if you use generateOpenApiDocument(). |
swagger-ui-dist | Required only if you use createSwaggerUiHandler(). |
Every dependency beyond next/react is an optional peer dependency — install only
the ones the features you use actually need. npm install nextjs-nestapi alone will not
pull any of them in for you.