From b0da214ad53fa31e1cb5dca3dd75d90ac386492f Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Tue, 30 Dec 2014 18:06:41 +0100 Subject: [PATCH] hack to avoid warnings in swagger usage --- src/node/hooks/express/swagger.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/node/hooks/express/swagger.js b/src/node/hooks/express/swagger.js index 55706a703..b9308dee0 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);