added response check for swagger 2.0/1.2 client
This commit is contained in:
3
dist/lib/swagger.js
vendored
3
dist/lib/swagger.js
vendored
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user