Commit Graph

27 Commits

Author SHA1 Message Date
Amit Reinich
2a1e4e5b91 Modified toString function to encode a copy instead of the real (re-used) object, added schema tests for model.ChangeContext line and column on enum changes. 2024-01-11 06:28:05 -05:00
Tristan Cartledge
13b97f84db chore: add more test coverage 2023-12-14 17:42:32 +00:00
Tristan Cartledge
1a384fd982 fix: cleanup 2023-12-01 17:47:55 +00:00
Tristan Cartledge
a4ad09aab3 fix: continued moving everything to orderedmaps plus cleaned up most the tests 2023-12-01 17:37:07 +00:00
Tristan Cartledge
785824a271 fix: fixed tests after merge 2023-11-27 17:05:37 +00:00
Shawn Poulson
f389fedadd Monster refactor of map to orderedmap.Map data type. 2023-09-25 08:59:42 -04:00
Quobix
4879ccc489 Cleaned up what-changed race condition issues #165
A few small async issues needed attention.

Signed-off-by: Quobix <dave@quobix.com>
2023-09-01 06:00:03 -04:00
Dave Shanley
d17ae1d610 Added more tests to ensure correct coverage.
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-07-18 14:44:50 -04:00
Dave Shanley
0fbcb81015 Adding some edge cases to what-changed code
Some specs were blowing things up, some deeper logic was required.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-07-18 14:44:50 -04:00
Derrick J. Wippler
9e487a8c49 fix: mutex now convers writes to ValueReference if they happen 2023-06-30 13:08:37 -04:00
Dave Shanley
f269259fcf fix: handle example comparison correctly. #61
examples can be anything, most commonly maps. previously `libopenapi` did not check maps correctly. Now it does. It was also creating a panic by inserting a nil pointer as the value to a map key. This has also been fixed.

Examples are the only element that use this pattern for comparison.
2023-01-05 17:05:36 -05:00
Hugo Stijns
d6031b5440 Fix compare different node tag 2022-12-30 10:24:58 -05:00
Hugo Stijns
fc7da1d38d Change identation to tabs 2022-12-30 10:24:58 -05:00
Dave Shanley
d6ca1802f6 Fixed small glitch in what-changed for checking nil values.
gofmt does not operate the same across mac and windows, this is wht the whole file got shuffled. odd.
2022-11-27 12:50:20 -05:00
Dave Shanley
ddf772270e What-changed is ready
Needs documenting, but the feature is ready for an application to really stress test the model and logic.

Guess what's next :) (after docs)

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-11-20 14:30:50 -05:00
Dave Shanley
6c3cc97b04 swagger what-changed support climbing.
working through more rough edges, making some choices.
2022-11-20 14:30:50 -05:00
Dave Shanley
26d3535e75 Working through what-changed fixes and tuneups.
more testing is required, however things feel quite reasonable and rounded. All changes correctly detected in a spec so far.
2022-11-20 14:30:50 -05:00
Dave Shanley
a85445019d what-changed v3 document testing and fixes.
sending bolts of electricity through the entire stack is throwing errors here and there, simple null values that need checking, some forgotten has functions and what not. shaking out as many bad splices as possible as we reach for the summit.
2022-11-18 11:00:34 -05:00
Dave Shanley
59bf83c446 Supercharged test coverage back up to 99.9%
I can't test that one line in the index, so this will do.

Now to complete the document for what's changed.
2022-11-18 11:00:34 -05:00
Dave Shanley
12594fdf1c Components what-changed completed.
Now to move on to the document and finally some perform stress testing.

AND THEN! we're done with this MF. Jesus H Christ, what a mission.
2022-11-18 11:00:34 -05:00
Dave Shanley
f66c77ccb5 Working through components what-changed code.
Moved comparison function for map checking to be async, removed the untyped variation as it's no longer required. Getting prepared for tests
2022-11-18 11:00:34 -05:00
Dave Shanley
6694ad54d2 Upgraded comparison funcrtion for maps.
It's  now more intelligent and runs async in threads, also added a variation of the map check function to cope with untyped comparison functions.
2022-11-18 11:00:34 -05:00
Dave Shanley
49ba7bb8b7 Added callback object to what-changed
Cleaned up more covage in v3 model, we're almost there. My god what a mission this has been.
2022-11-18 11:00:34 -05:00
Dave Shanley
61f99b8fd6 Replacing extensions hash code **breaking change**
This is a large update, I realized that extensions are not being hashed correctly, and because I have the same code everywhere, it means running back through the stack and cleaning up the invalid code that will break if multiple extensions are used in different positions in the raw spec.

At the same time, I realized that the v2 model has the same primitive/enum issues that are part cleaned up in v3. This is a breaking changhe because enums are now []any and not []string, as well as primitives for bool, int etc are all pointers now instead of the copied values.

This will break any consumers.
2022-11-18 11:00:34 -05:00
Dave Shanley
73d3120587 Wiring up operation what-changed functionality
A number of changes, glitches and updates were required across the models, some of the hashing functions will need re-working when hashing maps after testing higher level concepts.
2022-11-18 11:00:34 -05:00
Dave Shanley
3bc0a3a577 v2 swagger scopes added to what-changed.
Added hashing functions to all v2 and v3 models that handle security, thats the next target.
2022-11-18 11:00:34 -05:00
Dave Shanley
fcd4a0f57d Refactoring the what-changed again
I cannot pull these models apart, they are too inter-connected and imports will cycle.
2022-11-18 11:00:34 -05:00