swagger-api/swagger-js

Introduce backward compatible URI Reference resolution

char0n opened this issue · 3 comments

char0n commented

In https://github.com/swagger-api/swagger-js/releases/tag/v3.21.0 we've drop legacy url depedency and replaced it with new URL API. New URL API is not capable of resolving Relative URI References against Relative URI Reference. We've made sure that latest SwaggerUI version always sends absolute baseURL, but earlier EOL versions of SwaggerUI (v3 and v4) and legacy SwaggerEditor@4 are affected by this change.

The goal of this issue is to provide backward compatible behavior while resolving Relative URI References.

Refs swagger-api/swagger-ui#9215

char0n commented

Addressed in #3148 and released in v3.22.2

Hi @char0n, this PR has broken our repos on Windows, as the cwd value has backslashes and line 82 fails with [ERR_INVALID_URL]: Invalid URL.
Could you please correct this behaviour by normalising the paths before resolving?