-
Notifications
You must be signed in to change notification settings - Fork 42
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
Incorrect $ref resolution #907
Comments
Hi @jebertz! By default, we require references from the root of the directory. Relative references are supported via the
And thanks for pointing out that language in the spec, I wasn't aware of that. We're working towards a v9 release and we're hoping to deprecate the Thanks! Tagging a few potentially related issues below for posterity: APIDevTools/json-schema-ref-parser#199 |
Thank you for the quick response. We had tried workingDirectory, but were apparently using it incorrectly on the first try. After your message, we tried the If it's helpful to you for future designs, we're trying to run the validate as a job in github actions on PR/push for any files that changed and then run sync on merge. We very heavily use $refs and are also only trying to lint one directory (we have the OAS for internal, our legacy external - v2, and our new external - v3 in one repo and only want to validate the v3). We are also using spectral and were evaluating a few other tools as well that expected the refs to be relative (which was why we didn't just change them). Thanks again! |
@jebertz great to hear that the |
We were only trying to do this for our public v3 endpoints, and they're all in a single directory (with common files elsewhere). I think if we wanted to do multiple directories the simplest thing would probably to re-do this whole flow per-directory. It's a little hard code-y, but this should almost never change, so not a big deal. We did:
I guess we're struggling with the syncing due to things related to the ID as mentioned in that other issue. |
Got it, thanks for sending that across! I'm going to close this out since it appears this specific issue around |
thank you! |
$refs are resolved using the relative path from where rdme is run, not the relative path to the referring document as it is specified in https://spec.openapis.org/oas/v3.1.0#relativeReferencesURI. This is causing a lot of issues in our ability to automate.
The text was updated successfully, but these errors were encountered: