Merge pull request #2383 from jt1796/param-fix

fix params showing as undefined
This commit is contained in:
Tony Tam
2016-09-04 20:32:18 -07:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -43,7 +43,11 @@ Handlebars.registerHelper('renderTextParam', function(param) {
idAtt = ' id=\'' + valueId + '\'';
}
if (defaultValue) {
defaultValue = sanitizeHtml(defaultValue);
} else {
defaultValue = '';
}
if(isArray) {
result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + name + '\'' + idAtt + dataVendorExtensions;

View File

@@ -24,7 +24,6 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
var consumes = this.model.consumes || [];
var sampleJSON, signatureView;
if (typeof type === 'undefined') {
if (schema.$ref) {
var ref = schema.$ref;