swagger-api / swagger-js

Javascript library to connect to swagger-enabled APIs via browser or nodejs
http://swagger.io
Apache License 2.0
2.62k stars 758 forks source link

Replace regular expressions for path templating #3503

Closed glowcloud closed 4 months ago

glowcloud commented 4 months ago

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: https://github.com/swagger-api/swagger-js/blob/10cbc2ec785d9a0ab2d25a3b0c903c730a8d3d31/src/execute/swagger2/parameter-builders.js#L54

https://github.com/swagger-api/swagger-js/blob/10cbc2ec785d9a0ab2d25a3b0c903c730a8d3d31/src/execute/oas3/parameter-builders.js#L24

glowcloud commented 4 months ago

Addressed in https://github.com/swagger-api/swagger-js/pull/3504