Merge branch 'develop_2.0' of ssh://github.com/bdkosher/swagger-ui into bdkosher-develop_2.0

This commit is contained in:
Tony Tam
2015-06-03 22:23:48 -07:00
15 changed files with 40 additions and 45 deletions

View File

@@ -4,10 +4,8 @@ SwaggerUi.Views.ContentTypeView = Backbone.View.extend({
initialize: function() {},
render: function(){
this.model.contentTypeId = 'ct' + Math.random();
$(this.el).html(Handlebars.templates.content_type(this.model));
$('label[for=contentType]', $(this.el)).text('Response Content Type');
return this;
}
});

View File

@@ -4,10 +4,8 @@ SwaggerUi.Views.ParameterContentTypeView = Backbone.View.extend({
initialize: function () {},
render: function(){
this.model.parameterContentTypeId = 'pct' + Math.random();
$(this.el).html(Handlebars.templates.parameter_content_type(this.model));
$('label[for=parameterContentType]', $(this.el)).text('Parameter content type:');
return this;
}

View File

@@ -31,6 +31,7 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
this.model.isBody = this.model.paramType === 'body' || this.model.in === 'body';
this.model.isFile = type && type.toLowerCase() === 'file';
this.model.default = (this.model.default || this.model.defaultValue);
this.model.valueId = 'm' + this.model.name + Math.random();
if (this.model.allowableValues) {
this.model.isList = true;
@@ -98,4 +99,4 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
}
}
}
});
});

View File

@@ -4,10 +4,8 @@ SwaggerUi.Views.ResponseContentTypeView = Backbone.View.extend({
initialize: function(){},
render: function(){
this.model.responseContentTypeId = 'rct' + Math.random();
$(this.el).html(Handlebars.templates.response_content_type(this.model));
$('label[for=responseContentType]', $(this.el)).text('Response Content Type');
return this;
}
});