Really hammering on this model using all available examples of crazy references used in crazy ways. The fixes mean I can delete the recent patch added to handle lost indexes.
I spent two days on this commit.
Signed-off-by: quobix <dave@quobix.com>
All known gaps (well known in my own head) seem to have been closed now, the final TODO in this area has been cleaned up, highlighted by an issue reported by speakeasy.
Signed-off-by: quobix <dave@quobix.com>
A new codepath created a double dip into the index, which skews the working path. A short circuit is required, and a new block of code catches it.
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>
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>
In vacuum, a usecase was reported where an infinite loop occurred due to re-parsing the same reference over and over in a loop. It was re-creatable and it was because the loop happened before the index was ready.
This should be resolved now, at least for this use case. To be sure, I have included the specs as a new test.
https://github.com/daveshanley/vacuum/issues/268
Signed-off-by: Dave Shanley <dave@quobix.com>
Tests all passing, runs super fast, pulls in every single DigitalOcean spec and parses it. There may be some issues deeper down in the models, but for now high level tests all pass.