added response check for swagger 2.0/1.2 client

This commit is contained in:
Tony Tam
2014-09-16 17:40:33 -07:00
parent 394afba3e5
commit 91822035ef
7 changed files with 39 additions and 22 deletions

3
dist/lib/swagger.js vendored
View File

@@ -99,6 +99,7 @@ var SwaggerApi = function(url, options) {
this.info = null;
this.useJQuery = false;
this.modelsArray = [];
this.isValid;
options = (options||{});
if (url)
@@ -213,6 +214,7 @@ SwaggerApi.prototype.buildFromSpec = function(response) {
this.apisArray.push(res);
}
}
this.isValid = true;
if (this.success) {
this.success();
}
@@ -260,6 +262,7 @@ SwaggerApi.prototype.buildFrom1_1Spec = function(response) {
this.apisArray.push(res);
}
}
this.isValid = true;
if (this.success) {
this.success();
}