From 49e6389f3ff6d8e96c209b5535e8f01b7c06b57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD=D1=82=D0=B8?= =?UTF-8?q?=D0=BD=20=D0=9A=D0=B0=D0=BB=D0=B8=D0=BD=D0=B8=D0=BD?= Date: Fri, 13 Feb 2015 15:57:34 +0300 Subject: [PATCH] translated of title-attribute and extended a list ow known lexemes --- dist/lib/swagger-client.js | 19 ++++--------------- dist/swagger-ui.js | 2 -- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/dist/lib/swagger-client.js b/dist/lib/swagger-client.js index cf036396..86fad53a 100644 --- a/dist/lib/swagger-client.js +++ b/dist/lib/swagger-client.js @@ -291,7 +291,6 @@ var SwaggerClient = function(url, options) { this.isValid = false; this.info = null; this.useJQuery = false; - this.resourceCount = 0; if(typeof url !== 'undefined') return this.initialize(url, options); @@ -1570,7 +1569,6 @@ SwaggerClient.prototype.buildFrom1_2Spec = function (response) { this.apisArray.push(res); } else { var k; - this.expectedResourceCount = response.apis.length; for (k = 0; k < response.apis.length; k++) { var resource = response.apis[k]; res = new SwaggerResource(resource, this); @@ -1579,16 +1577,11 @@ SwaggerClient.prototype.buildFrom1_2Spec = function (response) { } } this.isValid = true; - return this; -}; - -SwaggerClient.prototype.finish = function() { if (typeof this.success === 'function') { - console.log('success'); - this.selfReflect(); this.success(); - } -} + } return this; +}; + SwaggerClient.prototype.buildFrom1_1Spec = function (response) { log('This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info'); @@ -1735,11 +1728,9 @@ var SwaggerResource = function (resourceObj, api) { on: { response: function (resp) { var responseObj = resp.obj || JSON.parse(resp.data); - _this.api.resourceCount += 1; return _this.addApiDeclaration(responseObj); }, error: function (response) { - _this.api.resourceCount += 1; return _this.api.fail('Unable to read api \'' + _this.name + '\' from path ' + _this.url + ' (server returned ' + response.statusText + ')'); } @@ -1793,9 +1784,7 @@ SwaggerResource.prototype.addApiDeclaration = function (response) { } this.api[this.name] = this; this.ready = true; - if(this.api.resourceCount === this.api.expectedResourceCount) - this.api.finish(); - return this; + return this.api.selfReflect(); }; SwaggerResource.prototype.addModels = function (models) { diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js index 4169bd07..a0a8486b 100644 --- a/dist/swagger-ui.js +++ b/dist/swagger-ui.js @@ -289,7 +289,6 @@ SwaggerUi = (function(_super) { }; SwaggerUi.prototype.load = function() { - console.log(0) var url, _ref; if ((_ref = this.mainView) != null) { _ref.clear(); @@ -1938,7 +1937,6 @@ ResourceView = (function(_super) { }; ResourceView.prototype.addOperation = function(operation) { - console.log(operation) var operationView; operation.number = this.number; operationView = new OperationView({