updated swagger.js

This commit is contained in:
Tony Tam
2014-11-26 17:21:20 -10:00
parent 07574c8698
commit c578fc1832
2 changed files with 14 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
// swagger.js
// version 2.0.44
// version 2.0.45
(function () {
@@ -905,6 +905,12 @@
}
else if (param.paramType === 'form' || param.paramType.toLowerCase() === 'file')
possibleParams.push(param);
else if (param.paramType === 'body' && param.name !== 'body') {
if (args.body) {
throw new Error("Saw two body params in an API listing; expecting a max of one.");
}
args.body = args[param.name];
}
}
if (args.body != null) {