Commit Graph

33 Commits

Author SHA1 Message Date
quobix
96e781892f Fixing example output
Signed-off-by: quobix <dave@quobix.com>
2023-09-21 06:01:23 -04:00
quobix
fe5dbb9251 Fixed borked test with correct config
Signed-off-by: quobix <dave@quobix.com>
2023-09-21 06:01:23 -04:00
quobix
e624607a56 more test cleanup
Signed-off-by: quobix <dave@quobix.com>
2023-09-21 06:01:23 -04:00
quobix
d9a11e8ff2 Cleaned up resolver test
re-enabled missing converage

Signed-off-by: quobix <dave@quobix.com>
2023-09-21 06:01:23 -04:00
quobix
715bfc3052 Added support for configurable levels of circular reference checking #113 #130
Signed-off-by: quobix <dave@quobix.com>
2023-09-21 06:01:23 -04:00
Dave Shanley
c3cf5f1e38 Added support for unevaluatedProperties as Schema and bool #118
Also ran `gofmt` across the entire project. Things need cleaning up.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-06-17 14:12:27 -04:00
Dave Shanley
f629c0ff58 fix for resolving looping relative references
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>
2023-05-16 17:03:02 -04:00
Dave Shanley
5189eadddc Large refactor and addedGetAllChanges to each change
tons of updates, so many things.
2023-03-26 06:10:31 -04:00
Dave Shanley
def670dbba Adressed comments from @n0rig on #83
Fixed digital ocean test fix, bumped comments up a little
2023-02-22 09:14:27 -05:00
Dave Shanley
b72ccf3c06 Fixed counter issue
I am getting tired now, time for a break.
2023-02-22 09:14:27 -05:00
Dave Shanley
a93cc8cb61 Fixed mistake with resolver, correct behavior is back. 2023-02-22 09:14:27 -05:00
Dave Shanley
fa59b5d21d Aligned CheckForCircularErrors and Resolve
the two methods were doing different things, now they are not.
2023-02-22 09:14:27 -05:00
Dave Shanley
e6626fe22e Support for relative links now in place #73
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.
2023-02-22 09:14:27 -05:00
Dave Shanley
e19b7d2bf1 Working through fix #73
Quite a bit of surgery required.
2023-02-22 09:14:27 -05:00
Dave Shanley
1df5f44e6f Working through fix-73 and v0.6.0 2023-02-22 09:14:27 -05:00
Dave Shanley
4706365744 Fixed tests that were using old signature.
Using new function, same old functionality.
2023-01-28 14:09:11 -05:00
Benjamin Nolan (TwoWholeWorms)
851062b628 chore: Adds a test for resolver.ResolverError.Error() 2023-01-11 05:47:06 -05:00
Benjamin Nolan (TwoWholeWorms)
d526584d4f chore: Removes TODO as the test has been fixed in main 2023-01-11 05:47:06 -05:00
Benjamin Nolan (TwoWholeWorms)
5f9541283a fix: Update tests where appropriate 2023-01-11 05:47:06 -05:00
Benjamin Nolan (TwoWholeWorms)
6dcc98e920 fix: Adds a 'visited' check to isInfiniteCircularReference() 2023-01-11 05:47:06 -05:00
Benjamin Nolan (TwoWholeWorms)
313e9f0c7f chore: TODO notes re: TestResolver_ResolveComponents_MixedRef 2023-01-11 05:47:06 -05:00
Benjamin Nolan (TwoWholeWorms)
ee504c543a feat: Allow circular references when the properties are not marked as required 2023-01-11 05:47:06 -05:00
Benjamin Nolan (TwoWholeWorms)
e8a954d5ae feat: Resolver tests for valid and invalid recursive models 2023-01-11 05:47:06 -05:00
Dave Shanley
8dff96ad90 Cleaning up some coverage and a few bits. 2022-12-15 16:31:32 -05:00
Dave Shanley
32f48385f2 (enhancement): Improved resolving/lookup code for #45 2022-12-15 16:31:32 -05:00
Dave Shanley
52a5b61de2 (feat): Upgraded circular error handling experience #27
Thinking more about how to know what to resolve and what not to means depending on circular reference knowledge. So using an idea from @TristanSpeakEasy, the `*resolver.ResolvingError`  now contains a pointer to the original circular error, and it also implements the `Error` interface correctly which allows it simple passage up the chain, without losing fidelity.

Added new documentation example as well

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-12-01 11:43:08 -05:00
Dave Shanley
57622b26e5 Docs, examples and new logo! 2022-09-26 10:52:09 -04:00
Dave Shanley
0de0c16c0c 99.9 % coverage & full OpenAPI v3 support
A single line that tries to read an HTTP response body and fails is very hard to test without mocking, and the mock does not add value to a single line of code to check for an error that can rarely ever be triggered. Going to settle for 99.9% for now.
2022-08-31 10:04:39 -04:00
Dave Shanley
081fc9be56 Bumping coverage across high level model
fixing small glitches as the model is tested. we're almost there! it's almost ready!
2022-08-24 11:26:39 -04:00
Dave Shanley
5d07da52b1 Fixed resolver to correctly identify polymorphic circular references.
Both stripe and k8s are correctly identified now.
2022-08-23 14:57:32 -04:00
Dave Shanley
1a71f449ff Huge performance increase with building.
Using some designs unearthed from building the higher level model, I have brough that design down to the lower level to speed things up. It only took 8 years, but finally, I think I have mastered mult-threading. No more deadlocks, and no more need for waitgroups for everything.
2022-08-22 09:46:44 -04:00
Dave Shanley
6c2de6c151 The resolver just got an upgrade, polymorphic circular reference checking.
Building out models that have circular references is tricky. Particularly when they are polymorphic ones. The resolver now searches the polymorphic references for circular references as well (which is returning much more valuable results now). The low level model is now sensitive to this and will avoid building out anything that is circular.
2022-08-22 09:24:23 -04:00
Dave Shanley
925220e8da Added resolver, models and model utils. 2022-07-18 09:42:46 -04:00