summaryrefslogtreecommitdiff
path: root/src/node
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-12-31 13:27:00 +0000
committerJohn McLear <john@mclear.co.uk>2014-12-31 13:27:00 +0000
commit4b6df17e99cb099425a466bee12b15f0751bf3fd (patch)
tree80be32852c9f07a86785b1a291a8c653e678bfed /src/node
parent83f62bb6a92fb35b50a40f2faf325358ac384d81 (diff)
parentb0da214ad53fa31e1cb5dca3dd75d90ac386492f (diff)
downloadetherpad-lite-4b6df17e99cb099425a466bee12b15f0751bf3fd.zip
Merge pull request #2421 from webzwo0i/fix-swagger
hack to avoid warnings in swagger usage
Diffstat (limited to 'src/node')
-rw-r--r--src/node/hooks/express/swagger.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/node/hooks/express/swagger.js b/src/node/hooks/express/swagger.js
index 55706a70..b9308dee 100644
--- a/src/node/hooks/express/swagger.js
+++ b/src/node/hooks/express/swagger.js
@@ -355,7 +355,17 @@ exports.expressCreateServer = function (hook_name, args, cb) {
args.app.use(basePath, subpath);
- swagger.setAppHandler(subpath);
+ //hack!
+ var swagger_temp = swagger
+ swagger = swagger.createNew(subpath);
+ swagger.params = swagger_temp.params
+ swagger.queryParam = swagger_temp.queryParam
+ swagger.pathParam = swagger_temp.pathParam
+ swagger.bodyParam = swagger_temp.bodyParam
+ swagger.formParam = swagger_temp.formParam
+ swagger.headerParam = swagger_temp.headerParam
+ swagger.error = swagger_temp.error
+ //swagger.setAppHandler(subpath);
swagger.addModels(swaggerModels);