-
Notifications
You must be signed in to change notification settings - Fork 64
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
How to get the source of a reference? #142
Comments
There's two things here and I'll discuss them individually. Definition Location The definition location is recorded as the key of the File Column/Line This is something I've wanted to do for a while and it can be done but it requires hefty dependencies and extra processing time. I'm not against it, and other tools (oval and sway) could benefit from it. It's something I want to do but I've just not prioritized it. |
It seems the path to the source file isn't currently being given to I am trying to write some custom logic for resolving files to mimic node_modules resolution, but I feel like I'm stuck due to not having the source file location. Is it possible to add the source file location to the arguments of |
|
This is an example of what I'm seeing in
|
Is this referenced from the parent document? If so, you could compute the path based on the knowledge of the parent document. Also, what version of |
Say I have three files, A which has a reference to B, which in turn has a reference to C. When I do a resolveRefs on A (or one of the find* variants), the result I get has a refs property and each element in that contains where the reference pointed to but there is no indication of where that reference was "defined" (the location/document and the hash of the element that contained the '$ref). Would it be possible to extend the RefDetails to also include this information?
I have looked into RefPostProcessor but am not sure if this information is passed to the processor.
I am writing a simple validator and this information is useful for reporting errors back to the user - at least in cases where the reference is invalid, missing or generates a warning (additional properties with a '$ref')
The text was updated successfully, but these errors were encountered: