swagger-api/swagger-js

Replace regular expressions for path templating

glowcloud opened this issue · 1 comments

Instead of using regular expressions to replace URL path variables, we should use:

https://github.com/char0n/openapi-path-templating?tab=readme-ov-file#resolution

It looks like this affects at least two places:

req.url = req.url.replace(new RegExp(`{${parameter.name}}`, 'g'), encodeURIComponent(value));

req.url = req.url.replace(new RegExp(`{${name}}`, 'g'), styledValue);

Addressed in #3504