diff options
author | John McLear <john@mclear.co.uk> | 2014-12-31 13:27:00 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2014-12-31 13:27:00 +0000 |
commit | 4b6df17e99cb099425a466bee12b15f0751bf3fd (patch) | |
tree | 80be32852c9f07a86785b1a291a8c653e678bfed /src/node | |
parent | 83f62bb6a92fb35b50a40f2faf325358ac384d81 (diff) | |
parent | b0da214ad53fa31e1cb5dca3dd75d90ac386492f (diff) | |
download | etherpad-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.js | 12 |
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); |