From 2378b176f5c7e60cc0a7bdbe09a9da7f96f9ec91 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Mon, 3 Feb 2014 08:28:22 -0800 Subject: [PATCH] fix for #388 --- dist/lib/swagger.js | 8 ++++++-- package.json | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dist/lib/swagger.js b/dist/lib/swagger.js index 6089c634..b1bf318d 100644 --- a/dist/lib/swagger.js +++ b/dist/lib/swagger.js @@ -53,7 +53,9 @@ useJQuery: this.useJQuery, url: this.url, method: "get", - headers: {}, + headers: { + accept: "application/json" + }, on: { error: function(response) { if (_this.url.substring(0, 4) !== 'http') { @@ -304,7 +306,9 @@ url: this.url, method: "get", useJQuery: this.useJQuery, - headers: {}, + headers: { + accept: "application/json" + }, on: { error: function(response) { return _this.api.fail("Unable to read api '" + _this.name + "' from path " + _this.url + " (server returned " + response.statusText + ")"); diff --git a/package.json b/package.json index 55bc4471..95dc84b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swagger-ui", - "version": "2.0.4", + "version": "2.0.5", "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", @@ -19,7 +19,7 @@ "readmeFilename": "README.md", "dependencies": { "coffee-script": "~1.5.0", - "swagger-client": "2.0.10", + "swagger-client": "2.0.11", "handlebars": "~1.0.10", "less": "~1.4.2" }