diff --git a/convert.js b/convert.js index d8fbb0e..a1ee575 100644 --- a/convert.js +++ b/convert.js @@ -327,9 +327,12 @@ var uuidv4 = require('uuid/v4'), i, verb; + // remove verbose query params from path, like: {?paramA,paramB} // replace path variables {petId} with :petId if (path) { - path = path.replace(/{/g, ':').replace(/}/g, ''); + path = path.replace(/{[?][a-zA-Z0-9_,]+}/g, '') + .replace(/{/g, ':') + .replace(/}/g, ''); } for (i = 0; i < numVerbs; i++) {