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.
Full low level coverage for swagger is back. I wish swagger would just go away to be honest. I look forward to the day when I can just delete all this code.
Signed-off-by: Dave Shanley <dave@quobix.com>
Starting to clean up the cross interface mess that I created when building what's changed for these pain in the ass objects that vary so much between versions. We don't need super shared interfaces with all the properties populated for this to be useful.
The case checking seems kinda dumb now looking back at this code. I am not sure why I felt the need to do that, however after being aware of it for some time and not being happy with the extra cycles it puts the code through.
This change removes ConvertCase from the utils package, as it's no longer used or needed right now. If it needs co come back, we can re-add the code, but deleting code always makes me happy.
It also removed a dependency from the project, which reduces the footprint, great!
bubbled right up to the top and all the hard bits are done! components/defs are up next, however before that - we have to clean up some of the test coverage carnage appearing in our model after so much feature work.
locating nodes was looking through two levels to locate something. This is not the correct behavior, after making the change - lots of tests needed to be updated to be correct in what they put into as a the root node.
The v3 model is wrong and out of sync with the spec. It's been corrected, so the v2 and v2 model for SecurityRequirement have been collapsed down into a base model., they are the same data structures. This has allowed me to delete the complexity of sharing two different models for the same structure, by unifying the model correctly. I am not sure why I decided to change the v3 model, oh well, its been corrected. Long live swagger!
Self induced pain on some of this by changing the design between v2 and v3 (not sure why split one into a slice and not the other). Too many herbs, oh well. Perhaps a refactor down the road will help. The v2 model is inaccurate, not the v3, so... well, who cares. Death to swagger!
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.
default was added twice, once to codes and then as a standalone value. technically incorrect, so now only codes are in codes. Default is deleted from the codes once extracted.
This one was perhaps one of the more frustrating models. It's a simple design, checking maps of string arrays for accurate changes - but the combinations make it a bit of a challenge. I hope I've caught the variations correctly. Bloody swagger, the sooner you go away, the easier all of our lies will be.