Commit Graph

40 Commits

Author SHA1 Message Date
quobix
c80e928e8b added more coverage 2024-08-05 09:29:07 -04:00
quobix
93c5b25d6c Added GetRootNode() and GetKeyNode methods to low model. 2024-07-08 10:14:32 -04:00
quobix
af665c95c1 bumped coverage with another test
Signed-off-by: quobix <dave@quobix.com>
2024-02-13 07:33:55 -05:00
quobix
7afb1e9d11 Addressed #159
Cleaned up all interesting static checks. All that is left is cosmetics.

Signed-off-by: quobix <dave@quobix.com>
2024-02-06 22:13:41 -05:00
quobix
d7c6474908 Bumped last line of coverage
Signed-off-by: quobix <dave@quobix.com>
2024-01-04 17:08:08 -05: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
2de65e4ca0 Merge branch 'main' into Baliedge/PIP-2552-consistent-ordering 2023-11-27 12:06:39 +00:00
quobix
b57528448b address coverage
Signed-off-by: quobix <dave@quobix.com>
2023-11-17 16:44:01 -05:00
quobix
6e9db7f838 A massive test update to bring everything inlne with the new Buildable signature.
All tests in index and datamodel now pass. The rolodex fixes all the things.

Signed-off-by: quobix <dave@quobix.com>
2023-10-23 18:18:44 -04:00
quobix
511843e4df Major surgery on the index and resolver. A complete flip in design.
Signed-off-by: quobix <dave@quobix.com>
2023-10-14 12:36:38 -04:00
quobix
faf191bdd0 bumped coverage on tests
Signed-off-by: quobix <dave@quobix.com>
2023-10-08 12:27:52 -04:00
Tristan Cartledge
8531113e17 fix!: fixed handling of additionalProperties to handle the bool/json-schema nature better 2023-10-05 09:31:16 -04:00
Shawn Poulson
c225546b04 Fixes to tests. 2023-09-25 09:47:50 -04:00
Tristan Cartledge
c700c19849 fix: add const test 2023-09-13 06:13:09 -04:00
Tristan Cartledge
58433a6ffc fix: add missing const value to schema 2023-09-13 06:13:09 -04:00
Dave Shanley
db27267e09 bumping test coverage, adding more tests.
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-06-17 14:12:27 -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
Derrick J. Wippler
a09916eb67 fix: Schema.Minimum and Schema.Maxmium are now float64 2023-06-17 13:12:50 -04:00
Dave Shanley
1f9a8bd185 Schema tests updated with fixes.
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-30 09:01:15 -04:00
Tristan Cartledge
99bf12c1c7 feat: add attribute to schema model 2023-04-18 05:22:49 -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
0b8fab869e working through code coverage 2023-03-26 06:10:31 -04:00
Dave Shanley
5d7f22fca7 first level testing for rending v3 model in place.
Now onto some hardening tests, lets re-render each spec after reading to check for failures.
2023-03-26 06:10:31 -04:00
Benjamin Nolan (TwoWholeWorms)
5f9541283a fix: Update tests where appropriate 2023-01-11 05:47:06 -05:00
Tristan Cartledge
52f9868d96 fix: fix handling of ordered arrays when processing them async 2023-01-10 17:39:03 -05:00
Dave Shanley
3fd088b217 Increased coverage for model back to 100% 2022-12-09 07:06:34 -05:00
Dave Shanley
b3f0a0b1ae Working on model changes to resolve #38 and #28 **breaking change**
Also adding in other properties to schema that are missing. Test coverage still needs improving and this is a breaking change to low and high models.
2022-12-09 07:06:34 -05:00
Dave Shanley
d51d2fcd27 Added contains, minContains and maxContains to schema #28
Added support for missing 3.1 schema properties, however it does not cover the `boolean` case
2022-12-09 07:06:34 -05:00
Dave Shanley
cbfb051a92 (feat): Schema now has pointer back to SchemaProxy #29
The 'owning' `SchemaProxy` is now trackable back from a `Schema` part of the conversations happening on #29
2022-12-05 12:18:10 -05:00
Dave Shanley
1f18491506 (fix): Fixed primitive decoding for default on schemas #15
@danielgtaylor reported a bug with schema's not picking up primitive values for defaults. This glitch was caused by the `model_builder` only wanting to deal with objects and ignoring primitives (it was checking for a map). This check has been removed, and all defaults should now be picked up (object or not).

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-11-30 08:39:22 -05:00
Dave Shanley
c4b6e68197 Added prefixItems support to Schema. Fixes #2
prefixItems is a property of JSONSchema and supported by OpenAPI 3.1, this update adds support for `prefixItems` in low and high models. It's essentially a copy of the `items` property, but allows seperate configuration of both, without combining them and muddling things for clarity.

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-11-21 09:44:51 -05:00
Dave Shanley
e1e91d0682 Bumping coverage
checking all the corners for cobwebs
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
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
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
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
5bd0d8de50 Bumping coverage on low level models after new feature.
Fixed borked test
2022-11-18 11:00:34 -05: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
19269af7d7 Added support for 3.1 updates to schema 2022-09-14 11:16:16 -04:00
Dave Shanley
68743113ed Refactoring core structure of datamodel to accomodate v2 model.
There is a lot of overlap on these models, to create a much more sensible design, a new 'base' package has been added which contains shared models that both versions make use of.
2022-09-01 08:53:16 -04:00