1.6.11 • Published 8 months ago

@nanogiants/nestjs-swagger-api-exception-decorator v1.6.11

Weekly downloads
222
License
MIT
Repository
github
Last release
8 months ago

NestJS Swagger API Exception Decorator

Node.js CI Quality Gate Status Coverage npm npm downloads

Description

NestJS Swagger decorator for API exceptions.

Installation

$ npm i @nanogiants/nestjs-swagger-api-exception-decorator

Example

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);
  }
}

Getting Started

Please visit our documentation to get started.

Release Notes

Please visit the Release Notes in our documentation for major and minor releases. Patch releases are documentated in GitHub Releases.

1.6.11

8 months ago

1.6.10

9 months ago

1.6.5

2 years ago

1.6.3

2 years ago

1.6.1

2 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago