This commit is contained in:
Tony Tam
2014-01-02 19:54:10 -08:00
parent 54d0a8ec09
commit 15acb15af6
3 changed files with 170 additions and 112 deletions

22
dist/swagger-ui.js vendored
View File

@@ -1509,16 +1509,14 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
contentTypeModel.produces = this.model.produces;
_ref5 = this.model.parameters;
for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
param = _ref5[_i];
type = param.type || param.dataType;
if (typeof(type) != 'undefined' && type.toLowerCase() === 'file') {
if (!contentTypeModel.consumes) {
console.log("set content type ");
contentTypeModel.consumes = 'multipart/form-data';
}
}
param = _ref5[_i];
type = param.type || param.dataType;
if (type.toLowerCase() === 'file') {
if (!contentTypeModel.consumes) {
console.log("set content type ");
contentTypeModel.consumes = 'multipart/form-data';
}
}
}
responseContentTypeView = new ResponseContentTypeView({
model: contentTypeModel
@@ -1906,8 +1904,8 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
if (this.model.paramType === 'body') {
this.model.isBody = true;
}
if (typeof(type) != 'undefined' && type.toLowerCase() === 'file') {
this.model.isFile = true;
if (type.toLowerCase() === 'file') {
this.model.isFile = true;
}
template = this.template();
$(this.el).html(template(this.model));