Browse Source

fixed required param bug per #163

bubble
Tony Tam 11 years ago
parent
commit
722da60f5d
4 changed files with 6 additions and 6 deletions
  1. +2
    -2
      dist/swagger-ui.js
  2. +1
    -1
      dist/swagger-ui.min.js
  3. +1
    -1
      package.json
  4. +2
    -2
      src/main/template/param_required.handlebars

+ 2
- 2
dist/swagger-ui.js 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: {} }); }


+ 1
- 1
dist/swagger-ui.min.js
File diff suppressed because it is too large
View File


+ 1
- 1
package.json 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",


+ 2
- 2
src/main/template/param_required.handlebars 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}}


Loading…
Cancel
Save