fix for #381
This commit is contained in:
39
dist/lib/swagger.js
vendored
39
dist/lib/swagger.js
vendored
@@ -1188,19 +1188,46 @@
|
|||||||
}
|
}
|
||||||
cb = obj.on;
|
cb = obj.on;
|
||||||
res = {
|
res = {
|
||||||
error: function(response) {
|
error: function(raw) {
|
||||||
|
var headers, out;
|
||||||
if (obj) {
|
if (obj) {
|
||||||
return cb.error(response);
|
headers = raw._headers;
|
||||||
|
out = {
|
||||||
|
headers: headers,
|
||||||
|
url: raw.request.url,
|
||||||
|
method: raw.request.method,
|
||||||
|
status: raw.status,
|
||||||
|
data: raw.content.data
|
||||||
|
};
|
||||||
|
return cb.error(out);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
redirect: function(response) {
|
redirect: function(raw) {
|
||||||
|
var headers, out;
|
||||||
if (obj) {
|
if (obj) {
|
||||||
return cb.redirect(response);
|
headers = raw._headers;
|
||||||
|
out = {
|
||||||
|
headers: headers,
|
||||||
|
url: raw.request.url,
|
||||||
|
method: raw.request.method,
|
||||||
|
status: raw.status,
|
||||||
|
data: raw.content.data
|
||||||
|
};
|
||||||
|
return cb.redirect(out);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
307: function(response) {
|
307: function(raw) {
|
||||||
|
var headers, out;
|
||||||
if (obj) {
|
if (obj) {
|
||||||
return cb.redirect(response);
|
headers = raw._headers;
|
||||||
|
out = {
|
||||||
|
headers: headers,
|
||||||
|
url: raw.request.url,
|
||||||
|
method: raw.request.method,
|
||||||
|
status: raw.status,
|
||||||
|
data: raw.content.data
|
||||||
|
};
|
||||||
|
return cb.redirect(out);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
response: function(raw) {
|
response: function(raw) {
|
||||||
|
|||||||
@@ -1188,19 +1188,46 @@
|
|||||||
}
|
}
|
||||||
cb = obj.on;
|
cb = obj.on;
|
||||||
res = {
|
res = {
|
||||||
error: function(response) {
|
error: function(raw) {
|
||||||
|
var headers, out;
|
||||||
if (obj) {
|
if (obj) {
|
||||||
return cb.error(response);
|
headers = raw._headers;
|
||||||
|
out = {
|
||||||
|
headers: headers,
|
||||||
|
url: raw.request.url,
|
||||||
|
method: raw.request.method,
|
||||||
|
status: raw.status,
|
||||||
|
data: raw.content.data
|
||||||
|
};
|
||||||
|
return cb.error(out);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
redirect: function(response) {
|
redirect: function(raw) {
|
||||||
|
var headers, out;
|
||||||
if (obj) {
|
if (obj) {
|
||||||
return cb.redirect(response);
|
headers = raw._headers;
|
||||||
|
out = {
|
||||||
|
headers: headers,
|
||||||
|
url: raw.request.url,
|
||||||
|
method: raw.request.method,
|
||||||
|
status: raw.status,
|
||||||
|
data: raw.content.data
|
||||||
|
};
|
||||||
|
return cb.redirect(out);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
307: function(response) {
|
307: function(raw) {
|
||||||
|
var headers, out;
|
||||||
if (obj) {
|
if (obj) {
|
||||||
return cb.redirect(response);
|
headers = raw._headers;
|
||||||
|
out = {
|
||||||
|
headers: headers,
|
||||||
|
url: raw.request.url,
|
||||||
|
method: raw.request.method,
|
||||||
|
status: raw.status,
|
||||||
|
data: raw.content.data
|
||||||
|
};
|
||||||
|
return cb.redirect(out);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
response: function(raw) {
|
response: function(raw) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
"readmeFilename": "README.md",
|
"readmeFilename": "README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"coffee-script": "~1.5.0",
|
"coffee-script": "~1.5.0",
|
||||||
"swagger-client": "2.0.9",
|
"swagger-client": "2.0.10",
|
||||||
"handlebars": "~1.0.10",
|
"handlebars": "~1.0.10",
|
||||||
"less": "~1.4.2"
|
"less": "~1.4.2"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user