Skip to content

Latest commit

 

History

History
139 lines (92 loc) · 4.94 KB

CHANGELOG.md

File metadata and controls

139 lines (92 loc) · 4.94 KB

Changelog and release notes

0.8.0 [BREAKING CHANGES]

Features

  • extract generic @Session() deocorator into @SessionParam() and @Session() (ref [#335][#348][#407])
  • restore/introduce @QueryParams() and @Params() missing decorators options (ref [#289][#289])
  • normalize param object properties (for "queries", "headers", "params" and "cookies"), with this change you can easily validate query/path params using class-validator (ref [#289][#289])
  • improved params normalization, converting to primitive types is now more strict and can throw ParamNormalizationError (e.g. when number is expected but an invalid string (NaN) has been received) (ref [#289][#289])

0.7.7

Features

  • feat(ErrorHandling): add support for custom toJSON method in errors (ref #325)

Fixes

  • fixed inconsistent roles parameter in authorizationChecker (ref #308)

0.7.6

Fixes

  • fixed bugs with undefined result code behaviour

0.7.5

Fixes

  • fixed bugs with undefined result code behaviour

0.7.4

Fixes

  • fixed bugs with undefined result code behaviour

0.7.3

Features

  • Support for returning Buffer and streams from action handler (controller's method) (ref #285)
  • Custom driver support (ref #276)

Fixes

  • Directly calling response bug (ref #286)
  • Missing parameter in @BodyParam error message (ref #284)
  • Sync and async auth checker bug (ref (ref #283)
  • Handling different content-type responses in JsonController (ref #277)

0.7.2

Fixes

  • Using @Authorization decorator with Koa caused 404 responses (ref #240)
  • Allow throwing custom errors in authorizationChecker (ref #233)
  • check auth permissions before accepting files for upload (ref #251)

0.7.0 [BREAKING CHANGES]

  • some routing-controllers options has been changed and renamed
  • returned validation error value signature has changed
  • controllers and middlewares now can be specified in routing-controllers options
  • MiddlewareInterface was removed and instead ExpressMiddlewareInterface or KoaMiddlewareInterface should be used
  • ErrorMiddlewareInterface was renamed to ExpressErrorMiddlewareInterface
  • per-controller and per-action middlewares used in @UseBefore and @UseAfter now should not be marked with @Middleware decorator
  • @MiddlewareGlobalBefore() and @MiddlewareGlobalAfter() were removed and instead new signatures should be used: @Middleware({ type: "before" }) and @Middleware({ type: "after" })
  • named some decorator parameter names
  • added few new decorators to get all parameters like @QueryParams, @Params, @HeaderParams etc.
  • added @Authorized and @CurrentUser decorators
  • added new @Ctx decorator to use context with koa
  • @NullResultCode has been renamed to @OnNull, now supports error classes
  • @UndefinedResultCode has been renamed to @OnUndefined, now supports error classes
  • @EmptyResultCode has been removed. Use @OnUndefined decorator instead and return concrete types in your controllers.
  • added ability to create custom decorators
  • enabled validation by default
  • multiple bug fixes
  • codebase refactoring
  • removed JsonResponse and TextResponse decorators

0.6.10

Features

  • added integration with class-transform-validator for deserialization and auto validation request parameters

0.6.2

Features

  • made interceptors to support promises

0.6.1

Features

  • added interceptors support

0.6.0 [BREAKING CHANGES]

Features

  • middleware and error handlers support
  • everything packed into "routing-controllers" main export
  • added few more new decorators

Fixes

  • fixed multiple issues with param decorators
  • fixed multiple bugs
  • refactored core

Removals

  • removed parseJson from @Body decorator
  • removed ActionOptions
  • removed responseType from action options and added @JsonResponse and @TextResponse decorators

0.5.0

  • renamed package from controllers.ts to routing-controllers
  • added integration with constructor-utils for serialization and deserialization