fixed file bug for indent issue and param type check
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "swagger-ui",
|
||||
"version": "0.1.7",
|
||||
"version": "0.1.8",
|
||||
"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": {
|
||||
"build": "PATH=$PATH:./node_modules/.bin cake dist",
|
||||
|
||||
@@ -76,9 +76,9 @@ class OperationView extends Backbone.View
|
||||
# requires HTML5 compatible browser
|
||||
bodyParam = new FormData()
|
||||
|
||||
# add params
|
||||
# add params except file
|
||||
for param in @model.parameters
|
||||
if param.paramType is 'body'
|
||||
if param.paramType is 'body' and param.name isnt 'file'
|
||||
bodyParam.append(param.name, map[param.name])
|
||||
|
||||
# add files
|
||||
@@ -87,10 +87,10 @@ class OperationView extends Backbone.View
|
||||
|
||||
console.log(bodyParam)
|
||||
else
|
||||
bodyParam = null
|
||||
for param in @model.parameters
|
||||
if param.paramType is 'body'
|
||||
bodyParam = map[param.name]
|
||||
bodyParam = null
|
||||
for param in @model.parameters
|
||||
if param.paramType is 'body'
|
||||
bodyParam = map[param.name]
|
||||
|
||||
log "bodyParam = " + bodyParam
|
||||
|
||||
|
||||
Reference in New Issue
Block a user