зеркало из https://github.com/Azure/sway.git
Escape ( & ) from url before constructing regex
This commit is contained in:
Родитель
8de7212113
Коммит
4d557aa191
|
@ -77,7 +77,7 @@ function Path (api, path, definition, definitionFullyResolved, pathToDefinition)
|
|||
this.path = path;
|
||||
this.pathToDefinition = pathToDefinition;
|
||||
this.ptr = JsonRefs.pathToPtr(pathToDefinition);
|
||||
this.regexp = pathToRegexp(basePathPrefix + path.replace(/\{/g, ':').replace(/\}/g, ''));
|
||||
this.regexp = pathToRegexp(basePathPrefix + path.replace(/\(/g, '\\(').replace(/\)/g, '\\)').replace(/\{/g, ':').replace(/\}/g, ''));
|
||||
|
||||
// Assign local properties from the Swagger definition properties
|
||||
_.assign(this, definitionFullyResolved);
|
||||
|
|
Загрузка…
Ссылка в новой задаче