Browse Source

updated for #852

bubble
Tony Tam 9 years ago
parent
commit
703d3d048e
2 changed files with 30 additions and 4 deletions
  1. +15
    -2
      dist/lib/swagger-client.js
  2. +15
    -2
      lib/swagger-client.js

+ 15
- 2
dist/lib/swagger-client.js View File

@@ -696,7 +696,20 @@ SwaggerResource.prototype.addOperations = function (resource_path, ops, consumes
} }
} }
o.nickname = this.sanitize(o.nickname); o.nickname = this.sanitize(o.nickname);
var op = new SwaggerOperation(o.nickname, resource_path, method, o.parameters, o.summary, o.notes, type, responseMessages, this, consumes, produces, o.authorizations, o.deprecated);
var op = new SwaggerOperation(o.nickname,
resource_path,
method,
o.parameters,
o.summary,
o.notes,
type,
responseMessages,
this,
consumes,
produces,
o.authorizations,
o.deprecated);

this.operations[op.nickname] = op; this.operations[op.nickname] = op;
output.push(this.operationsArray.push(op)); output.push(this.operationsArray.push(op));
} }
@@ -888,7 +901,7 @@ var SwaggerOperation = function (nickname, path, method, parameters, summary, no
this.consumes = consumes; this.consumes = consumes;
this.produces = produces; this.produces = produces;
this.authorizations = typeof authorizations !== 'undefined' ? authorizations : resource.authorizations; this.authorizations = typeof authorizations !== 'undefined' ? authorizations : resource.authorizations;
this.deprecated = deprecated;
this.deprecated = (typeof deprecated === 'string' ? Boolean(deprecated) : deprecated);
this['do'] = __bind(this['do'], this); this['do'] = __bind(this['do'], this);


if (errors.length > 0) { if (errors.length > 0) {


+ 15
- 2
lib/swagger-client.js View File

@@ -696,7 +696,20 @@ SwaggerResource.prototype.addOperations = function (resource_path, ops, consumes
} }
} }
o.nickname = this.sanitize(o.nickname); o.nickname = this.sanitize(o.nickname);
var op = new SwaggerOperation(o.nickname, resource_path, method, o.parameters, o.summary, o.notes, type, responseMessages, this, consumes, produces, o.authorizations, o.deprecated);
var op = new SwaggerOperation(o.nickname,
resource_path,
method,
o.parameters,
o.summary,
o.notes,
type,
responseMessages,
this,
consumes,
produces,
o.authorizations,
o.deprecated);

this.operations[op.nickname] = op; this.operations[op.nickname] = op;
output.push(this.operationsArray.push(op)); output.push(this.operationsArray.push(op));
} }
@@ -888,7 +901,7 @@ var SwaggerOperation = function (nickname, path, method, parameters, summary, no
this.consumes = consumes; this.consumes = consumes;
this.produces = produces; this.produces = produces;
this.authorizations = typeof authorizations !== 'undefined' ? authorizations : resource.authorizations; this.authorizations = typeof authorizations !== 'undefined' ? authorizations : resource.authorizations;
this.deprecated = deprecated;
this.deprecated = (typeof deprecated === 'string' ? Boolean(deprecated) : deprecated);
this['do'] = __bind(this['do'], this); this['do'] = __bind(this['do'], this);


if (errors.length > 0) { if (errors.length > 0) {


Loading…
Cancel
Save