updated for 1.2 support
This commit is contained in:
@@ -32,7 +32,8 @@ class OperationView extends Backbone.View
|
||||
contentTypeModel.produces = @model.produces
|
||||
|
||||
for param in @model.parameters
|
||||
if param.dataType.toLowerCase() == 'file'
|
||||
type = param.type || param.dataType
|
||||
if type.toLowerCase() == 'file'
|
||||
if !contentTypeModel.consumes
|
||||
console.log "set content type "
|
||||
contentTypeModel.consumes = 'multipart/form-data'
|
||||
@@ -84,6 +85,10 @@ class OperationView extends Backbone.View
|
||||
if(o.value? && jQuery.trim(o.value).length > 0)
|
||||
map[o.name] = encodeURI(o.value)
|
||||
|
||||
for o in form.find("textarea")
|
||||
if(o.value? && jQuery.trim(o.value).length > 0)
|
||||
map["body"] = o.value
|
||||
|
||||
opts.responseContentType = $("div select[name=responseContentType]", $(@el)).val()
|
||||
opts.requestContentType = $("div select[name=parameterContentType]", $(@el)).val()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user