updated js lib

This commit is contained in:
Tony Tam
2015-02-25 22:14:14 -08:00
parent ff5e84744b
commit 7d3d100401
8 changed files with 199 additions and 587 deletions

View File

@@ -2089,7 +2089,7 @@ SwaggerResource.prototype.addApiDeclaration = function (response) {
if (typeof response.consumes === 'string')
this.consumes = response.consumes;
if ((typeof response.basePath === 'string') && response.basePath.replace(/\s/g, '').length > 0)
this.basePath = response.basePath.indexOf('http') === -1 ? this.getAbsoluteBasePath(response.basePath) : response.basePath;
this.basePath = response.basePath.indexOf('http') !== 0 ? this.getAbsoluteBasePath(response.basePath) : response.basePath;
this.resourcePath = response.resourcePath;
this.addModels(response.models);
if (response.apis) {
@@ -3043,7 +3043,6 @@ SwaggerHttp.prototype.execute = function(obj, opts) {
else {
obj.contentType = false;
obj.processData = false;
// delete obj.cache;
delete obj.headers['Content-Type'];
}
}