app/assets/javascripts/lib/swagger.js in swagger-ui_rails-0.1.0 vs app/assets/javascripts/lib/swagger.js in swagger-ui_rails-0.1.2
- old
+ new
@@ -1186,23 +1186,50 @@
if (!this.Shred) {
this.initShred();
}
cb = obj.on;
res = {
- error: function(response) {
+ error: function(raw) {
+ var headers, out;
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) {
- 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) {
- 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) {
var headers, out;
if (obj) {
@@ -1422,6 +1449,6 @@
this.SwaggerHttp = SwaggerHttp;
this.authorizations = new SwaggerAuthorizations();
-}).call(this);
\ No newline at end of file
+}).call(this);