parser-js
parser-js copied to clipboard
parseFromUrl does not resolve relative references
Describe the bug
Given the use of parseFromUrl I would expect that if the remote document contained relative references, they would be resolved based on the URL passed to parseFromUrl 🤔
How to Reproduce
Given a reference such as "$ref": "./components/parameters.json#/server_id" in an AsyncAPI document located at https://raw.githubusercontent.com/org/repo/main/asyncapi.json I would expect it to fetch the parameter from https://raw.githubusercontent.com/org/repo/main/components/parameters.json#/server_id instead of trying to fetch it locally on the machine.
@jonaslagoni just to be sure, this is feature request, not really a bug. Especially that if someone wants to do that what you just described has an option to pass custom resolver to parseFromUrl. We just do not provide such a resolver out of the box
@derberg that would make sense yes.
:tada: This issue has been resolved in version 1.16.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 2.0.0-next-major.18 :tada:
The release is available on:
Your semantic-release bot :package::rocket: