Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parseFromUrl does not resolve relative references #504

Closed
jonaslagoni opened this issue Mar 25, 2022 · 4 comments · Fixed by #572
Closed

parseFromUrl does not resolve relative references #504

jonaslagoni opened this issue Mar 25, 2022 · 4 comments · Fixed by #572
Labels

Comments

@jonaslagoni
Copy link
Member

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 jonaslagoni added the bug Something isn't working label Mar 25, 2022
@derberg
Copy link
Member

derberg commented Jul 18, 2022

@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

@jonaslagoni
Copy link
Member Author

@derberg that would make sense yes.

aeworxet added a commit to aeworxet/asyncapi-parser-js that referenced this issue Jul 18, 2022
aeworxet added a commit to aeworxet/asyncapi-parser-js that referenced this issue Jul 19, 2022
aeworxet added a commit to aeworxet/asyncapi-parser-js that referenced this issue Jul 19, 2022
aeworxet added a commit to aeworxet/asyncapi-parser-js that referenced this issue Jul 19, 2022
aeworxet added a commit to aeworxet/asyncapi-parser-js that referenced this issue Jul 19, 2022
aeworxet added a commit to aeworxet/asyncapi-parser-js that referenced this issue Jul 19, 2022
aeworxet added a commit to aeworxet/asyncapi-parser-js that referenced this issue Jul 20, 2022
aeworxet added a commit to aeworxet/asyncapi-parser-js that referenced this issue Aug 31, 2022
aeworxet added a commit to aeworxet/asyncapi-parser-js that referenced this issue Sep 1, 2022
jonaslagoni added a commit to aeworxet/asyncapi-parser-js that referenced this issue Sep 14, 2022
@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 1.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 2.0.0-next-major.18 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants