NestJS Swagger decorator for API exceptions
npm install @nanogiants/nestjs-swagger-api-exception-decorator




NestJS Swagger decorator for API exceptions.
``sh`
$ npm i @nanogiants/nestjs-swagger-api-exception-decorator
`typescript
import { ApiException } from '@nanogiants/nestjs-swagger-api-exception-decorator';
@ApiException(() => UnauthorizedException)
export class Controller {
@ApiOperation({ summary: 'Changes the users password' })
@ApiException(() => [PasswordsDidNotMatchException, OldAndNewPasswordMatchException, CredentialsNotValidException])
@Patch('/password')
async changeUserPassword(@Res() res: Response): Promise
return res.sendStatus(HttpStatus.OK);
}
}
``
Please visit our documentation to get started.
Please visit the Release Notes in our documentation for major and minor releases. Patch releases are documentated in GitHub Releases.