Skip to main content

v1.2.0

Breaking Changes​

  • New decorator signature: Single exceptions or multiple exceptions in an array now have to be passed with an arrow function. (Issue #1)
    • Example: @ApiException(() => BadRequestException)
    • The old signature without an arrow function is now deprecated and will be removed in future versions
    • Using the old signature with the @TemplatedApiException-decorator will be detected and a warning including the class and method names will be printed to the console

New Features​

  • Exceptions for multiple status codes may now be passed within a single decorator call (Issue #13)
    • Example: @TemplatedApiException(() => [UserNotFoundException, InvalidPasswordException])
    • No warnings are printed anymore and the grouping now works properly
  • New option properties (see new API description) (Issue #1)
    • type
    • schema
    • isArray

Fixed Issues​

  • null as template value caused an error