Skip to content

Commit bb5549b

Browse files
committed
added 1.2 flag to compat tests
1 parent 546920e commit bb5549b

File tree

12 files changed

+23
-18
lines changed

12 files changed

+23
-18
lines changed

lib/swagger-client.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* swagger-client - swagger.js is a javascript client for use with swaggering APIs.
3-
* @version v2.1.2-M1
3+
* @version v2.1.3-M1
44
* @link http://swagger.io
55
* @license apache 2.0
66
*/
@@ -391,7 +391,6 @@ SwaggerClient.prototype.build = function(mock) {
391391
return obj;
392392
new SwaggerHttp().execute(obj);
393393
}
394-
395394
return this;
396395
};
397396

@@ -507,8 +506,11 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
507506
}
508507
}
509508
this.isBuilt = true;
510-
if (this.success)
509+
if (this.success) {
510+
this.isValid = true;
511+
this.isBuilt = true;
511512
this.success();
513+
}
512514
return this;
513515
};
514516

@@ -1588,7 +1590,8 @@ SwaggerClient.prototype.buildFrom1_2Spec = function (response) {
15881590

15891591
SwaggerClient.prototype.finish = function() {
15901592
if (typeof this.success === 'function') {
1591-
console.log('success');
1593+
this.isValid = true;
1594+
this.isBuilt = true;
15921595
this.selfReflect();
15931596
this.success();
15941597
}

lib/swagger-client.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/swagger-a.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ SwaggerClient.prototype.build = function(mock) {
109109
return obj;
110110
new SwaggerHttp().execute(obj);
111111
}
112-
113112
return this;
114113
};
115114

@@ -225,8 +224,11 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
225224
}
226225
}
227226
this.isBuilt = true;
228-
if (this.success)
227+
if (this.success) {
228+
this.isValid = true;
229+
this.isBuilt = true;
229230
this.success();
231+
}
230232
return this;
231233
};
232234

src/js/swagger-compat.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ SwaggerClient.prototype.buildFrom1_2Spec = function (response) {
4949

5050
SwaggerClient.prototype.finish = function() {
5151
if (typeof this.success === 'function') {
52-
console.log('success');
52+
this.isValid = true;
53+
this.isBuilt = true;
5354
this.selfReflect();
5455
this.success();
5556
}

test/compat/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var mock = require('../../test/compat/mock');
44
var swagger = require('../../lib/swagger-client');
55
var sample, instance;
66

7-
describe('api key authorizations', function() {
7+
describe('1.2 api key authorizations', function() {
88
before(function(done) {
99
mock.petstore(done, function(petstore, server){
1010
sample = petstore;

test/compat/defaultCallbacks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var mock = require('../../test/compat/mock');
44
var swagger = require('../../lib/swagger-client');
55
var sample, instance;
66

7-
describe('default success callback', function() {
7+
describe('1.2 default success callback', function() {
88
var opts = {};
99
var finished;
1010
opts.defaultSuccessCallback = function(data) {

test/compat/http.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var expect = require('expect');
33
var mock = require('../../test/compat/mock');
44
var sample, instance;
55

6-
describe('http', function() {
6+
describe('1.2 http', function() {
77
before(function(done) {
88
mock.petstore(done, function(petstore, server){
99
sample = petstore;

test/compat/macros.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var expect = require('expect');
33
var mock = require('../../test/compat/mock');
44
var sample, instance;
55

6-
describe('macro overrides', function() {
6+
describe('1.2 macro overrides', function() {
77
before(function(done) {
88
var macros = {
99
parameter: function(operation, parameter) {

test/compat/modelSignatures.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var expect = require('expect');
33
var mock = require('../../test/compat/mock');
44
var sample, instance;
55

6-
describe('model signatures', function() {
6+
describe('1.2 model signatures', function() {
77
before(function(done) {
88
mock.petstore(done, function(petstore, server){
99
sample = petstore;

test/compat/models.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var mock = require('../../test/compat/mock');
44
var swagger = require('../../lib/swagger-client');
55
var sample, instance;
66

7-
describe('get model operations', function() {
7+
describe('1.2 get model operations', function() {
88
before(function(done) {
99
mock.petstore(done, function(petstore, server){
1010
sample = petstore;

0 commit comments

Comments
 (0)