Skip to content

Commit d1b2c42

Browse files
author
Andrew Nelson
committed
Instead of preserving slashes, just disable escaping entirely
1 parent 953152d commit d1b2c42

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/types/operation.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -483,13 +483,7 @@ Operation.prototype.urlify = function (args) {
483483
value = this.encodePathCollection(param.collectionFormat, param.name, value);
484484
} else {
485485

486-
if(param['x-escape'] === false ) {
487-
value = value.split('/')
488-
.map(function encodePathPart(part) {
489-
return encodeURIComponent(part);
490-
})
491-
.join('/');
492-
} else {
486+
if((typeof(param['x-escape']) === 'undefined') || (param['x-escape'] === true)) {
493487
value = this.encodePathParam(value);
494488
}
495489
}

0 commit comments

Comments
 (0)