nestjs-swagger-api-exception-decorator 1.6.3
Install from the command line:
Learn more about npm packages
$ npm install @nanogiants/nestjs-swagger-api-exception-decorator@1.6.3
Install via package.json:
"@nanogiants/nestjs-swagger-api-exception-decorator": "1.6.3"
About this version
NestJS Swagger decorator for API exceptions.
$ npm i @nanogiants/nestjs-swagger-api-exception-decorator
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<void> {
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.
Details
- nestjs-swagger-api-exception-decorator
- nanogiants
- about 2 years ago
- MIT
- 24 dependencies
Assets
- nestjs-swagger-api-exception-decorator-1.6.3.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0