On last project I had at work, I found out about this useful npm package swagger-typescript-api, which, given the URL of your OpenAPI specification, generates a file with all the controllers and methods and schemas.
This is my command from package.json:
{
"api:generate": "swagger-typescript-api generate -p http://localhost:3000/docs-json docs.json -o ./src/api -n generatedApi.ts --http-client axios"
}That’s convenient because every time you update your API, you can regenerate this file in your frontend, which can reference interfaces, requests and so on.
Also, today, while working with NestJS, I found myself in the classic situation where you outsource certain work to LLMs, and at the end you find out that it would’ve been better to Google more efficiently and specifically look into the documentation of the tool that you use, instead of jumping back and forth with Claude and wasting time and money using code agents. I learned about different decorators, like @ApiExtraModels(), which loads unused schemas by your controllers that need to be shown in the OpenAPI documentation. For example, I had some for the query parameters DTOs.