Commit Graph

210 Commits

Author SHA1 Message Date
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
Dave Shanley
bb0cdda4a9 Fleshed out encoding test 2022-11-18 11:00:34 -05:00
Dave Shanley
279625bf9e Added encoding test 2022-11-18 11:00:34 -05:00
Dave Shanley
b42e35f2b7 Wired up multi-version handling patterns
Designs for handling multiple versions of objects have been set, seems clean and scalable. Generic functions for handling maps has been added also, which will cut down time moving forward.
2022-11-18 11:00:34 -05:00
Dave Shanley
0aecd98ab6 Added multi version header checking to what-changed.
Header is literally two completely different objects between v2 and v3, what a pain in the ass.
2022-11-18 11:00:34 -05:00
Dave Shanley
e015ebe330 Added Items checking to what changed 2022-11-18 11:00:34 -05:00
Dave Shanley
9cd7e4f155 Working through what changed rabbit hole
Parameter dependencies mean we're back in the ball of yarn stage. Coverage is going to drop for a bit, until all the new hashing and interfaces are in place.
2022-11-18 11:00:34 -05:00
Dave Shanley
fa12f244b8 Fixing borked test with index checking.
This looks like it needs a deeper look, reverting change for now.

Signed-off-by: Dave Shanley <dshanley@splunk.com>
2022-11-11 13:11:25 -05:00
Dave Shanley
a6474469bb Merge pull request #11 from pb33f/fix-schema-resolving
Fixed resolving bug with polymorphic schemas.
2022-11-11 13:09:15 -05:00
Dave Shanley
44b219a023 Fixed resolving bug with polymorphic schemas.
Multiple polymorphic, deeply embedded schemas cause resolving issues as a channel waits forever due to a counting issue.

This has been resolved.

Signed-off-by: Dave Shanley <dshanley@splunk.com>
2022-11-11 13:07:38 -05:00
Dave Shanley
98725586fa fix: Example on high-level MediaType object #6
The example was not being pulled through correctly, it was throwing the whole low.NodeReference in there. This has been resolved now and the value of the example is correctly pulled through to the MediaType high level object.

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-11-07 08:41:22 -05:00
Dave Shanley
e01ef308c9 Merge pull request #10 from pb33f/bugfix-4
Fixed document test
2022-11-07 08:14:05 -05:00
Dave Shanley
a036f0c039 Fixed document test
No release required, no changes
2022-11-07 08:13:16 -05:00
Dave Shanley
928f8c0e44 Merge pull request #9 from pb33f/bugfix-4
fix: panic thrown when paths is wrapped in an array #4
2022-11-07 08:10:20 -05:00
Dave Shanley
1c98ae170a fix: panic thrown when paths is wrapped in an array #4
When paths are wrapped in an array, the index throws an error because it's expecting them to be supplied as a map. Now paths can be wrapped or unwrapped, the index won't care.
2022-11-07 08:09:22 -05:00
Dave Shanley
5162b6bcf3 Merge pull request #7 from danielgtaylor/info-ext
feat: add extensions to info
2022-11-07 07:39:50 -05:00
Daniel G. Taylor
5601ad1743 feat: add extensions to info 2022-11-04 13:20:04 -07:00
Dave Shanley
54d924d46d Enums in Schema are now interface{} types in datamodel #1
Addressing issues #1, Enums can be anything and should not be consideded plain strings.
2022-10-27 06:51:37 -04:00
Dave Shanley
626fe42ded Merge pull request #3 from travisnewhouse/schemaproxy_golow
Add GoLow method to high-level SchemaProxy
2022-10-26 07:14:50 -04:00
Dave Shanley
c62df74c10 Removing GoLow() implementation, to use PR #3
There is test coverage and a null check, which is better than my code.
2022-10-26 07:12:20 -04:00
Dave Shanley
4a2d80b9c5 Added GoLow() to high level schema proxy.
Travis Newhouse pointed out that there is no way to get to the low level proxy, from the high level one!
2022-10-26 06:53:09 -04:00
Travis Newhouse
7d68d4f589 Add GoLow method to high-level SchemaProxy
A client of high-level SchemaProxy may want to know whether a schema
is a reference and the name of the reference.  This information is
available from methods GetSchemaReference() and IsSchemaReference()
in low-level SchemaProxy.  Provide a GoLow() method to retrieve the
low-level SchemaProxy for a high-level SchemaProxy.
2022-10-25 12:55:22 -07:00
Dave Shanley
54316b4a00 Moved primitives to pointers in high-level schema.
A feature request from Travis Newhouse to make it easier to know which primitives have been set, and which have not. defaulting everything to 0 or false just doesn't work so well.
2022-10-25 07:23:02 -04:00
Dave Shanley
0d4e8bf3f8 Added securityRequirement reference tracking to index.
Swagger docs define securityDefinitions, however they are not tracked by the index, and vacuum needs to know about them, so now the index collects these references.
2022-10-21 17:38:39 -04:00
Dave Shanley
85755a1fae Refactored schema to be more readable. 2022-10-12 10:31:09 -04:00
Dave Shanley
8dfc333373 Working through schema change issues. 2022-10-11 10:22:47 -04:00
Dave Shanley
fada7e5b09 Schema example checking is now in place.
Added generic hasing function for anything untyped.
2022-10-11 07:12:08 -04:00
Dave Shanley
a819f9ea29 Fixed broken test for breaking changes.
Looking good now.
2022-10-10 12:21:02 -04:00
Dave Shanley
61beb3ea2a Schema what-changed almost complete.
Perhaps the biggest and most complex of all the models to determine what has changed.
2022-10-10 12:19:57 -04:00
Dave Shanley
b83e751aa7 Working through test coverage of schema proxy
Main logic is now in place, ready for fleshing out. Pattern feels right.
2022-10-09 19:33:58 -04:00
Dave Shanley
277c7c0a4c Working through schema changes. 2022-10-09 14:37:05 -04:00
Dave Shanley
4b9c5fba1e Building out schema comparison mechanism
Which has led to a new wider hashing capability for the low level API. hashing makes it very easy to determine changes quickly, without having to run comparisons to discover changes, could really speed things up moving forward.
2022-10-08 14:09:46 -04:00
Dave Shanley
7f61a7624d Fixed flaky test in what changed
There is no order guarantee once parsed, I need to stop nmaking this mistake.

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-10-05 11:37:42 -04:00
Dave Shanley
f7703c4266 Added example object to what-changed feature.
Ready to tackle the main event now. The Schema!

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-10-05 11:33:35 -04:00
Dave Shanley
3649dc594f Refactored total change counts
Design is more uniformed and standardized, patterns are bubbling up. I think we're ready to tackle the schema soon.

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-10-05 11:24:37 -04:00
Dave Shanley
0b2c3c1201 Added breaking change count to core design
Everything will now calculate total changes and breaking changes as a convenience and aggregation mechanism.

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-10-05 10:15:55 -04:00