diff --git a/src/main/javascript/view/ParameterView.js b/src/main/javascript/view/ParameterView.js index b5079c48..ff8a296a 100644 --- a/src/main/javascript/view/ParameterView.js +++ b/src/main/javascript/view/ParameterView.js @@ -30,7 +30,13 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({ this.model.paramType = this.model.in || this.model.paramType; 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); + + // Allow for default === false + if(typeof this.model.default === 'undefined') { + this.model.default = this.model.defaultValue; + } + + this.model.hasDefault = (typeof this.model.default !== 'undefined'); this.model.valueId = 'm' + this.model.name + Math.random(); if (this.model.allowableValues) { @@ -99,4 +105,4 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({ } } } -}); \ No newline at end of file +}); diff --git a/src/main/template/param_list.handlebars b/src/main/template/param_list.handlebars index 69a70b4b..c3913c35 100644 --- a/src/main/template/param_list.handlebars +++ b/src/main/template/param_list.handlebars @@ -1,23 +1,17 @@