Skip to content

Do not create operations for non-HTTP methods/verbs #692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions lib/swagger-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ SwaggerAuthorizations.prototype.apply = function(obj, authorizations) {
if (result === true)
status = true;
}
}
}
}
}

Expand Down Expand Up @@ -415,6 +415,9 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
if(typeof response.paths[path] === 'object') {
var httpMethod;
for(httpMethod in response.paths[path]) {
if(['delete', 'get', 'head', 'options', 'patch', 'post', 'put'].indexOf(httpMethod) === -1) {
continue;
}
var operation = response.paths[path][httpMethod];
var tags = operation.tags;
if(typeof tags === 'undefined') {
Expand Down Expand Up @@ -991,7 +994,7 @@ Operation.prototype.encodeCollection = function(type, name, value) {
}

/**
* TODO this encoding needs to be changed
* TODO this encoding needs to be changed
**/
Operation.prototype.encodeQueryParam = function(arg) {
return escape(arg);
Expand Down Expand Up @@ -1031,7 +1034,7 @@ var Model = function(name, definition) {
if(requiredFields.indexOf(key) >= 0)
required = true;
this.properties.push(new Property(key, property, required));
}
}
}
}

Expand Down Expand Up @@ -1210,7 +1213,7 @@ Property.prototype.toString = function() {
str += ', <span class="propOptKey">optional</span>';
str += ')';
}
else
else
str = this.name + ' (' + JSON.stringify(this.obj) + ')';

if(typeof this.description !== 'undefined')
Expand Down Expand Up @@ -1474,4 +1477,4 @@ ShredHttpClient.prototype.execute = function(obj) {
obj.on = res;
}
return this.shred.request(obj);
};
};