Commit Graph

245 Commits

Author SHA1 Message Date
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
1abc25a923 Added component checking for swagger models.
components support now caters to v2, v3 coming shortly - but now it's time for a walk. this shit is exhausting my brain.
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
94aabf4928 Cleanup of remaing extension hashing
extension hashing is now accurate across the v2 and v3 low level models.
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
1cd492ae37 v3 low level Parameter at 100% coverage. 2022-11-18 11:00:34 -05:00
Dave Shanley
aa62232440 v3 Links, callbacks operations low level models at 100% coverage 2022-11-18 11:00:34 -05:00
Dave Shanley
4ca8e160ed OAuthFlows in v3 low level model back at 100% coverage 2022-11-18 11:00:34 -05:00
Dave Shanley
892a7e5ae9 v2 low level media type back at 100% coverage. 2022-11-18 11:00:34 -05:00
Dave Shanley
1b0c0df4b2 v3 low level Links at 100% coverage
Bumpy bump bumpity bump.

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-11-18 11:00:34 -05:00
Dave Shanley
7ffc294e97 Tuned low level schema hash function.
Wasn't quite right, now it's looking much more right!

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-11-18 11:00:34 -05:00
Dave Shanley
4fc14f1e62 Encoding v3 low level model back to 100% coverage
Signed-off-by: Dave Shanley <dave@quobix.com>
2022-11-18 11:00:34 -05:00
Dave Shanley
350d1054c4 low level v3 header model now at 100% coverage
tuned things up and swapping in some 3.1 dynamic schema varaible checking.

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-11-18 11:00:34 -05:00
Dave Shanley
617b423923 Coverage for v2 low level model back at 100%
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>
2022-11-18 11:00:34 -05:00
Dave Shanley
d221c99714 bumped coverage for v2 low level operations back to 100% 2022-11-18 11:00:34 -05:00
Dave Shanley
4f3b10bbbf Cleaned up model interfaces for parameters
overlapping getters created a mess, the mess is now clean.
2022-11-18 11:00:34 -05:00
Dave Shanley
2db63cc019 v2 Operation coverage back to 100% 2022-11-18 11:00:34 -05:00
Dave Shanley
ce82d42ce3 Bumped coverage on headers and items in v2 package.
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.
2022-11-18 11:00:34 -05:00
Dave Shanley
127c21b55e Bumped low level v2 examples test coverage 2022-11-18 11:00:34 -05:00
Dave Shanley
77ecbd418f Updated model builder to use lowercase checks only. **breaking change**
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!
2022-11-18 11:00:34 -05:00
Dave Shanley
9e0c5cd2e9 Bumped test coverage for v2 low level header.
New code means more tests.
2022-11-18 11:00:34 -05:00
Dave Shanley
5e86e7094f low level base model back at 100% coverage
A few little gaps opened up with new code, all tucked back in.
2022-11-18 11:00:34 -05:00
Dave Shanley
a522ec0f91 Paths added to what-changed feature
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.
2022-11-18 11:00:34 -05:00
Dave Shanley
55291d42c0 Fixed up what-changed tests after model fix.
Now all tests are building the model correctly and everything is passing again, confidence up much higher now.
2022-11-18 11:00:34 -05:00
Dave Shanley
a184c5e909 Fixed a low level bug with locating nodes.
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.
2022-11-18 11:00:34 -05:00
Dave Shanley
131513a6f6 Path items added to what changed
Path items now diffable! woo!
2022-11-18 11:00:34 -05:00
Dave Shanley
602bedaf3a Operations mostly completed with what-changed
meaty mc meat is done! well, almost - we still have to add in callbacks. We will do that once we have paths in, then we can close the gap.
2022-11-18 11:00:34 -05:00
Dave Shanley
76440de820 V2 Operation what-changed is completed
All properties are now checked, onto finishing up v3 code.
2022-11-18 11:00:34 -05:00
Dave Shanley
d27e66ff3d Refactored SecurityRequirement **breaking change**
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!
2022-11-18 11:00:34 -05:00
Dave Shanley
4b30fe3622 Updated security requirement checks for what-changed
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!
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
e3a455307c Responses added to what-changed feature
Responses are now checkable.
2022-11-18 11:00:34 -05:00
Dave Shanley
5d3671f605 Fixed default glitch and added hash function.
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.
2022-11-18 11:00:34 -05:00
Dave Shanley
b06ef4bcc9 Wiring up responses into what-changed feature
Building tests and hashing functions.
2022-11-18 11:00:34 -05:00
Dave Shanley
5bd0d8de50 Bumping coverage on low level models after new feature.
Fixed borked test
2022-11-18 11:00:34 -05:00
Dave Shanley
ff07c764ca v2 and v3 response model now in place.
Closing in around the branch soon, all the leaves and twigs are just about in place.
2022-11-18 11:00:34 -05:00
Dave Shanley
19d5d62413 Added link checking to what-changed
chop, chop chop. chopping away at the tree of comparison data.
2022-11-18 11:00:34 -05:00
Dave Shanley
476017d63d Added v3 server to what changed 2022-11-18 11:00:34 -05:00
Dave Shanley
733af5510e Added server variable to what changed. 2022-11-18 11:00:34 -05:00
Dave Shanley
4671bca168 Added hash functions to various low level models. 2022-11-18 11:00:34 -05:00
Dave Shanley
1e0b45217a Request body added to what-changed feature
getting there! not far to go now.
2022-11-18 11:00:34 -05:00
Dave Shanley
9c3c935530 v2 and v3 security scheme is now in place for what changed
full converage for security, with confidence.
2022-11-18 11:00:34 -05:00
Dave Shanley
c78cbd5cd0 fixed borked test 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
Dave Shanley
1197562438 Refactoring what-changed
there are too many files in the root package now and it's a mess, so this is a staged approach to cleanly refactor into clear packages.
2022-11-18 11:00:34 -05:00
Dave Shanley
53e04b5346 Swagger securityRequirement added to what-changed
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.
2022-11-18 11:00:34 -05:00
Dave Shanley
e90d934a4b wc: Parameters, headers, encoding, media type.
All at 100%, the more complex parts of the model are now in, the rest should be quite straight forward (famous last words).
2022-11-18 11:00:34 -05:00