You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the command below to see that without query params it works perfectly fine.
make reproduce-working
Run the command below to see it failing whenever there's a query parameter in the URL.
make reproduce-broken
You will now see the following error:
╰─$ make reproduce-broken
npx --yes @redocly/cli@latest bundle routes-not-working.yaml --output routes-not-working.json --ext=json
(node:36505) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
bundling routes-not-working.yaml...
[1] routes-not-working.yaml:10:5 at #/paths/~1api~1invoices
Can't resolve $ref
8 | paths:
9 | /api/invoices:
10 | $ref: 'https://raw.githubusercontent.com/vernondegoede/repo1/4deae7ddf2dad69ab31c2770c9dab51239d445a2/test.yaml?test=bl...<9 chars>
Error was generated by the bundler rule.
❌ Errors encountered while bundling routes-not-working.yaml: bundle not created (use --force to ignore errors).
make: *** [reproduce-broken] Error 1
Our use case is the following: we want to link to URLs in other Gitlab repos and link to specific refs:
What's interesting is that the URL itself actually does seem to resolve. It's not possible to show this in this repo, but if I use a query parameter that will return in a 404 it will actually tell me that the file was not found. However, it now fails to find the actual ref somehow. I'm not sure why :-)
Expected behavior
I would expect the full URL to resolve and find the correct ref.
That would be amazing!
You can start with the ref-utils file, specifically here, where the ref gets split into the url and the pointer. Then, the link itself gets loaded inside the BaseResolver class.
I hope you'll also find our contributing guide helpful.
Feel free to reach out in case you have any further questions.
Cheers!
Describe the bug
It seems that any remote
$ref
that includes a query parameter cannot be resolved correctly.To Reproduce
Steps to reproduce the behavior:
You will now see the following error:
Our use case is the following: we want to link to URLs in other Gitlab repos and link to specific refs:
What's interesting is that the URL itself actually does seem to resolve. It's not possible to show this in this repo, but if I use a query parameter that will return in a 404 it will actually tell me that the file was not found. However, it now fails to find the actual ref somehow. I'm not sure why :-)
Expected behavior
I would expect the full URL to resolve and find the correct ref.
Logs
See above
OpenAPI description
See https://github.com/vernondegoede/repo2-with-specs/blob/main/routes-not-working.yaml
And the downstream
$ref
: https://github.com/vernondegoede/repo1/blob/4deae7ddf2dad69ab31c2770c9dab51239d445a2/test.yamlRedocly Version(s)
Latest
Node.js
Version(s)v21.4.0
Additional context
N/A
The text was updated successfully, but these errors were encountered: