-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Expose information about extended Refs #70
Comments
What would you propose as a solution? Keep in mind that |
@Alan-Cha and I are actually interested in the same thing. We would like to keep track of the original references in the resulting dereferenced object. What if the user could provide an option to retain the original Alternatively, what if the user could provide the name of a field to add to
|
When dereferencing this adds a `$originalRef` property indicating where it was referenced from. * It only does this for objects, not of strings, numbers and other types. * Some objects will get referenced from multiple places, so `$originalRef` is actually an array. The original idea was proposed here: APIDevTools#70
@luma 's commit in his fork seems to be what I'm looking for - is it possible to include that in mainline? |
Probably if it was cleaned up. The way I implemented it was a bit of a hack
and it had at least one undesirable side affect (I can't remember what it
is right now but I'll try and find my notes).
I don't have any time to work on it right now but you're welcome to pick up
the change and propose to upstream? Perhaps the maintainers could recommend
ways to clean up the implementation
…On Sun, 5 Jan 2020, 5:23 pm Theo Gravity, ***@***.***> wrote:
@luma <https://github.com/luma> commit in his fork seems to be what I'm
looking for - is it possible to include that in mainline?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#70?email_source=notifications&email_token=AAAGZQV6WK5KRVPK6PV4V4TQ4F4GZA5CNFSM4EOTHEWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIDNSPY#issuecomment-570874175>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAGZQTTZRG43JX6DADLDKTQ4F4GZANCNFSM4EOTHEWA>
.
|
When resolving references it would be useful to know when there is a schema that was an extended ref. Ie.
given the following schema
it produces the following dereferenced output.
There is no way for the consumer to know that properties
a
andb
were once the same pointerThe text was updated successfully, but these errors were encountered: