When a polymorphic type is used, that isn’t a ref, but contains a ref, is now picked up. Thank you vercel for this edge case. Please build better specs.
Signed-off-by: quobix <dave@quobix.com>
Signed-off-by: quobix <dave@quobix.com>
Move original ref resolving to end of resolving run
this prevents mid-recursion shifting of nodes.
Signed-off-by: quobix <dave@quobix.com>
speakeasy have some crazy recursive tests. It highlighted an issue with nested resolving intriduced in 0.13.7 of libopenapi to resolve issue #195
This in fact created another bug that only shows up with deeply nested refs, the problem is that the resolver was stitching together references, whilst still burrowing, which means it lots it’s place when jumping around everywhere.
Signed-off-by: quobix <dave@quobix.com>
stopped rolodex looking up root file, looking in components schemas for a reference also. Dropped stripe circular refs down by one. seems to be catching the duplicate now.
Signed-off-by: quobix <dave@quobix.com>
This builds on the last patch, by also catching the issue in the resolver and then allowing it to bubble up to applications.
no new fixes, no new featuers, just better integration so vacuum can report the issues.
Signed-off-by: quobix <dave@quobix.com>
If the number of relatives exceeds 500 deep when resolving, libopenapi will now log a warning and escape that path from continuing. There is no reason on earth for a depth this large. It most likely indicates a circular reference that was ignored and then resolved.
Signed-off-by: quobix <dave@quobix.com>
discovered while running tests, vacuum explodes with the new stripe spec. It’s a `FullDefintion` vs `Definition` misfire.
Signed-off-by: quobix <dave@quobix.com>
Resolving and indexing has changed, new code is required and this isue highlighted a glitch introduced with the addition of the rolodex when resolving.
Signed-off-by: quobix <dave@quobix.com>
Every `Build()` method now requires a `context.Context`. This is so the rolodex knows where to resolve from when locating relative links. Without knowing where we are, there is no way to resolve anything. This new mechanism allows the model to recurse across as many files as required to locate references, without loosing track of where we are in the process.
Signed-off-by: quobix <dave@quobix.com>
Before everything worked, but was completely accurate, now everything works and everything is absolute and can be resolved. Phew, what a mission!
Signed-off-by: quobix <dave@quobix.com>
There is a horrible amount of work to be done to clean this up, and wire in remote support. but so far, this is working as expected and is now a much cleaner design, (once everything has been cleaned up that is)
Signed-off-by: quobix <dave@quobix.com>