Skip to content

Commit 4860e6a

Browse files
author
Ahmed Hekal
committed
Merge branch 'master' into support-using-custom-multer-instance-in-register-routes
2 parents e58d403 + c2bd263 commit 4860e6a

File tree

8 files changed

+14
-38
lines changed

8 files changed

+14
-38
lines changed

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "6.3.0",
2+
"version": "6.3.1",
33
"npmClient": "yarn",
44
"command": {
55
"version": {

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tsoa/cli",
33
"description": "Build swagger-compliant REST APIs using TypeScript and Node",
4-
"version": "6.3.0",
4+
"version": "6.3.1",
55
"main": "./dist/index.js",
66
"typings": "./dist/index.d.ts",
77
"files": [

packages/cli/src/routeGeneration/templates/express.hbs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ export function RegisterRoutes(app: Router) {
125125
validatedArgs,
126126
successStatus: {{successStatus}},
127127
});
128-
next();
129128
} catch (err) {
130129
return next(err);
131130
}

packages/tsoa/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tsoa",
33
"description": "Build swagger-compliant REST APIs using TypeScript and Node",
4-
"version": "6.3.0",
4+
"version": "6.3.1",
55
"main": "./dist/index.js",
66
"typings": "./dist/index.d.ts",
77
"files": [
@@ -28,7 +28,7 @@
2828
"author": "Luke Autry <[email protected]> (http://www.lukeautry.com)",
2929
"license": "MIT",
3030
"dependencies": {
31-
"@tsoa/cli": "^6.3.0",
31+
"@tsoa/cli": "^6.3.1",
3232
"@tsoa/runtime": "^6.3.0"
3333
},
3434
"devDependencies": {

tests/fixtures/express/server.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,7 @@ app.use((req: any, res: any, next: any) => {
3636
req.stringValue = 'fancyStringForContext';
3737
next();
3838
});
39-
let postRouteMiddlwareCalled = false;
4039
RegisterRoutes(app);
41-
app.get('/reset-post-route-middleware-status', (req, res, next) => {
42-
postRouteMiddlwareCalled = false;
43-
res.json({ postRouteMiddlwareCalled }).send();
44-
next();
45-
});
46-
app.get('/post-route-middleware-status', (req, res, next) => {
47-
res.json({ postRouteMiddlwareCalled }).send();
48-
next();
49-
});
50-
app.use((req, res, next) => {
51-
postRouteMiddlwareCalled = true;
52-
next();
53-
});
5440

5541
// It's important that this come after the main routes are registered
5642
app.use((err: any, req: express.Request, res: express.Response, next: express.NextFunction) => {

tests/integration/express-server.spec.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,13 @@ import {
2424
const basePath = '/v1';
2525

2626
describe('Express Server', () => {
27-
it('can reset the post route middleware status', () => {
28-
return verifyGetRequest('/reset-post-route-middleware-status', (_err, res) => {
29-
expect(res.body.postRouteMiddlwareCalled).to.eq(false);
30-
});
31-
});
3227
it('can handle get request to root controller`s path', () => {
3328
return verifyGetRequest(basePath + '/', (_err, res) => {
3429
const model = res.body as TestModel;
3530
expect(model.id).to.equal(1);
3631
});
3732
});
38-
it('can verify that post request middleware was called', () => {
39-
return verifyGetRequest('/post-route-middleware-status', (_err, res) => {
40-
expect(res.body.postRouteMiddlwareCalled).to.eq(true);
41-
});
42-
});
33+
4334
it('can handle get request to root controller`s method path', () => {
4435
return verifyGetRequest(basePath + '/rootControllerMethodWithPath', (_err, res) => {
4536
const model = res.body as TestModel;

tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "tsoa-tests",
33
"private": true,
44
"description": "Build swagger-compliant REST APIs using TypeScript and Node",
5-
"version": "6.3.0",
5+
"version": "6.3.1",
66
"keywords": [
77
"typescript",
88
"openapi",

yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,11 +1923,11 @@ brace-expansion@^2.0.1:
19231923
balanced-match "^1.0.0"
19241924

19251925
braces@^3.0.2, braces@~3.0.2:
1926-
version "3.0.2"
1927-
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
1928-
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
1926+
version "3.0.3"
1927+
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
1928+
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
19291929
dependencies:
1930-
fill-range "^7.0.1"
1930+
fill-range "^7.1.1"
19311931

19321932
19331933
version "1.3.1"
@@ -3095,10 +3095,10 @@ filelist@^1.0.4:
30953095
dependencies:
30963096
minimatch "^5.0.1"
30973097

3098-
fill-range@^7.0.1:
3099-
version "7.0.1"
3100-
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
3101-
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
3098+
fill-range@^7.1.1:
3099+
version "7.1.1"
3100+
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
3101+
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
31023102
dependencies:
31033103
to-regex-range "^5.0.1"
31043104

0 commit comments

Comments
 (0)