@nestjs/swagger ts-patch/ttypescript plugin reduce the amount of boilerplate code required. see more on https://docs.nestjs.com/openapi/cli-plugin.
Add this plugin to tsconfig.json
.
{
"compilerOptions": {
// ...other options
"plugins": [
{
"transform": "./build/typescript-nestjs-swagger.ts",
"introspectComments": true
}
]
}
}
For all options supported, please see: @nestjs/swagger