@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>
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>
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.
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.
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.
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.