Merge pull request #2421 from webzwo0i/fix-swagger

hack to avoid warnings in swagger usage
pull/2424/head
John McLear 2014-12-31 13:27:00 +00:00
commit 4b6df17e99
1 changed files with 11 additions and 1 deletions

View File

@ -355,7 +355,17 @@ exports.expressCreateServer = function (hook_name, args, cb) {
args.app.use(basePath, subpath); 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); swagger.addModels(swaggerModels);