- updated
class-transformer
andclass-validator
to latest.
- feat(ErrorHandling): add support for custom toJSON method in errors (ref #325)
- fixed inconsistent roles parameter in authorizationChecker (ref #308)
- fixed bugs with undefined result code behaviour
- fixed bugs with undefined result code behaviour
- fixed bugs with undefined result code behaviour
- Support for returning Buffer and streams from action handler (controller's method) (ref #285)
- Custom driver support (ref #276)
- 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)
- 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)
- 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 insteadExpressMiddlewareInterface
orKoaMiddlewareInterface
should be usedExpressErrorMiddlewareInterface
was renamed intoErrorMiddlewareInterface
- 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
andTextResponse
decorators
- added integration with
class-transform-validator
for deserialization and auto validation request parameters
- made interceptors to support promises
- added interceptors support
- middleware and error handlers support
- everything packed into "routing-controllers" main export
- added few more new decorators
- fixed multiple issues with param decorators
- fixed multiple bugs
- refactored core
- removed
parseJson
from@Body
decorator - removed
ActionOptions
- removed
responseType
from action options and added@JsonResponse
and@TextResponse
decorators
- renamed package from
controllers.ts
torouting-controllers
- added integration with
constructor-utils
for serialization and deserialization