Example project
A complete, runnable example — routing, DTO validation, and the OpenAPI/Swagger setup —
lives in example/
in the main repository: a real create-next-app project with nextjs-nestapi wired in.
git clone https://github.com/DeveloperRejaul/nextjs-nestapi.git
cd nextjs-nestapi/example
npm install
npm run dev
Then open http://localhost:3000 for links to the API routes, and /api-docs for the
Swagger UI.
What it demonstrates
- A
HelloControllerwith@Get,@Get("/:id"), and@Post+@Body(CreateHelloDto) - DTO validation failures returning a structured error response
@ApiTags/@ApiOperation/@ApiResponseannotations/api/openapi.jsonand/api-docswired viagenerateOpenApiDocument()andcreateSwaggerUiHandler()