fixed required param bug per #163

This commit is contained in:
Tony Tam
2013-03-08 06:19:29 -08:00
parent db4175ef57
commit 722da60f5d
4 changed files with 6 additions and 6 deletions

4
dist/swagger-ui.js vendored
View File

@@ -1031,7 +1031,7 @@ function program12(depth0,data) {
function program13(depth0,data) { function program13(depth0,data) {
var buffer = "", stack1; var buffer = "", stack1;
buffer += "\n <input class='parameter' class='required' minlength='1' name='"; buffer += "\n <input class='parameter required' minlength='1' name='";
foundHelper = helpers.name; foundHelper = helpers.name;
stack1 = foundHelper || depth0.name; stack1 = foundHelper || depth0.name;
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); } if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }
@@ -1047,7 +1047,7 @@ function program13(depth0,data) {
function program15(depth0,data) { function program15(depth0,data) {
var buffer = "", stack1; var buffer = "", stack1;
buffer += "\n <input class='parameter' class='required' minlength='1' name='"; buffer += "\n <input class='parameter required' minlength='1' name='";
foundHelper = helpers.name; foundHelper = helpers.name;
stack1 = foundHelper || depth0.name; stack1 = foundHelper || depth0.name;
if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); } if(typeof stack1 === functionType) { stack1 = stack1.call(depth0, { hash: {} }); }

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "swagger-ui", "name": "swagger-ui",
"version": "0.1.12", "version": "0.1.13",
"description": "Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API", "description": "Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
"scripts": { "scripts": {
"build": "PATH=$PATH:./node_modules/.bin cake dist", "build": "PATH=$PATH:./node_modules/.bin cake dist",

View File

@@ -17,9 +17,9 @@
<input class='parameter' class='required' type='file' name='{{name}}'/> <input class='parameter' class='required' type='file' name='{{name}}'/>
{{else}} {{else}}
{{#if defaultValue}} {{#if defaultValue}}
<input class='parameter' class='required' minlength='1' name='{{name}}' placeholder='(required)' type='text' value='{{defaultValue}}'/> <input class='parameter required' minlength='1' name='{{name}}' placeholder='(required)' type='text' value='{{defaultValue}}'/>
{{else}} {{else}}
<input class='parameter' class='required' minlength='1' name='{{name}}' placeholder='(required)' type='text' value=''/> <input class='parameter required' minlength='1' name='{{name}}' placeholder='(required)' type='text' value=''/>
{{/if}} {{/if}}
{{/if}} {{/if}}
{{/if}} {{/if}}