diff --git a/lib/loader.js b/lib/loader.js index 35a800f..eac894c 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -220,7 +220,10 @@ class Component { // // "Expose" operations by omitting the leading _ from the method name. // - Object.keys(endpoint.pathItem) + const supportedMethods = ['get', 'put', 'post', 'delete', 'patch'] + + supportedMethods + .filter(method => endpoint.pathItem[method]) .forEach(method => { component[method] = component['_' + method] if (method === 'get') component.getStream = component._getStream