Skip to content

Commit 888c790

Browse files
authored
Merge branch 'master' into next
2 parents 6f64c86 + 4a56d17 commit 888c790

File tree

9 files changed

+7402
-24
lines changed

9 files changed

+7402
-24
lines changed

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
language: node_js
22
node_js:
33
- stable
4+
- 8
45
- 6
5-
- 5
6-
- 4
7-
#- 0.12
8-
#- 0.11
96

107
after_success:
118
- bash <(curl -s https://codecov.io/bash)

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#### Features
66

7-
- extract generic `@Session()` deocorator into `@SessionParam()` and `@Session()`
7+
- extract generic `@Session()` deocorator into `@SessionParam()` and `@Session()` (ref [#335][#348][#407])
88
- restore/introduce `@QueryParams()` and `@Params()` missing decorators options (ref [#289][#289])
99
- 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])
1010
- 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])

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 TypeStack
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# routing-controllers
22

3-
[![Build Status](https://travis-ci.org/pleerock/routing-controllers.svg?branch=master)](https://travis-ci.org/pleerock/routing-controllers)
4-
[![codecov](https://codecov.io/gh/pleerock/routing-controllers/branch/master/graph/badge.svg)](https://codecov.io/gh/pleerock/routing-controllers)
3+
[![Build Status](https://travis-ci.org/typestack/routing-controllers.svg?branch=master)](https://travis-ci.org/typestack/routing-controllers)
4+
[![codecov](https://codecov.io/gh/typestack/routing-controllers/branch/master/graph/badge.svg)](https://codecov.io/gh/typestack/routing-controllers)
55
[![npm version](https://badge.fury.io/js/routing-controllers.svg)](https://badge.fury.io/js/routing-controllers)
6-
[![Dependency Status](https://david-dm.org/pleerock/routing-controllers.svg)](https://david-dm.org/pleerock/routing-controllers)
7-
[![Join the chat at https://gitter.im/pleerock/routing-controllers](https://badges.gitter.im/pleerock/routing-controllers.svg)](https://gitter.im/pleerock/routing-controllers?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6+
[![Dependency Status](https://david-dm.org/typestack/routing-controllers.svg)](https://david-dm.org/typestack/routing-controllers)
7+
[![Join the chat at https://gitter.im/typestack/routing-controllers](https://badges.gitter.im/typestack/routing-controllers.svg)](https://gitter.im/typestack/routing-controllers?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
88

99
Allows to create controller classes with methods as actions that handle requests.
1010
You can use routing-controllers with [express.js][1] or [koa.js][2].
@@ -818,13 +818,13 @@ app.listen(3000);
818818

819819
## Using middlewares
820820

821-
You can use any exist express / koa middleware, or create your own.
821+
You can use any existing express / koa middleware, or create your own.
822822
To create your middlewares there is a `@Middleware` decorator,
823823
and to use already exist middlewares there are `@UseBefore` and `@UseAfter` decorators.
824824

825-
### Use exist middleware
825+
### Use existing middleware
826826

827-
There are multiple ways to use middlewares.
827+
There are multiple ways to use middleware.
828828
For example, lets try to use [compression](https://github.com/expressjs/compression) middleware:
829829

830830
1. Install compression middleware: `npm install compression`
@@ -909,7 +909,7 @@ Here is example of creating middleware for express.js:
909909
}
910910
```
911911

912-
Then you can them this way:
912+
Then you can use them this way:
913913

914914
```typescript
915915
import {Controller, UseBefore} from "routing-controllers";
@@ -1024,7 +1024,7 @@ export class LoggingMiddleware implements ExpressMiddlewareInterface {
10241024
}
10251025
```
10261026

1027-
To enable this middleware specify it during routing-controllers initialization:
1027+
To enable this middleware, specify it during routing-controllers initialization:
10281028

10291029
```typescript
10301030
import "reflect-metadata";
@@ -1201,7 +1201,7 @@ export class UserController {
12011201
If `User` is an interface - then simple literal object will be created.
12021202
If its a class - then instance of this class will be created.
12031203

1204-
This technique works not only with `@Body`, but also with `@Param`, `@QueryParam`, `@BodyParam` and other decorators.
1204+
This technique works with `@Body`, `@Param`, `@QueryParam`, `@BodyParam`, and other decorators.
12051205
Learn more about class-transformer and how to handle more complex object constructions [here][4].
12061206
This behaviour is enabled by default.
12071207
If you want to disable it simply pass `classTransformer: false` to createExpressServer method.
@@ -1509,7 +1509,7 @@ of usage.
15091509
15101510
## Release notes
15111511
1512-
See information about breaking changes and release notes [here](https://github.com/pleerock/routing-controllers/tree/master/doc/release-notes.md).
1512+
See information about breaking changes and release notes [here](CHANGELOG.md).
15131513
15141514
[1]: http://expressjs.com/
15151515
[2]: http://koajs.com/

0 commit comments

Comments
 (0)