Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.4.0 Fixes #38 and #28 and introduces more 3.1 schema support. #40

Merged
merged 3 commits into from
Dec 9, 2022

Conversation

daveshanley
Copy link
Member

@daveshanley daveshanley commented Dec 8, 2022

v0.4.0 Updates the base.Schema for both high and low-level models to fix some inaccuracies and introduce missing properties for JSON Schema / v3.1

What was added

  • if
  • else
  • then
  • propertyNames
  • contains
  • minContains
  • maxContains
  • unevaluatedItems
  • unevaluatedProperties
  • dependentSchemas
  • patternProperties

What changed

DynamicValue was added as a container for values with differing types. This follows the same pattern established in the low level model.

Items can now be a SchemaProxy or a bool (using DynamicValue), no longer a slice.

Not is also no longer a slice.

ExclusiveMinimum and ExclusiveMaximum are now DynamicValue pointers that can be either a bool or int64

The ExclusiveMinimumBool and ExclusiveMaximumBool properties have been removed as they are now combined.

These are breaking changes, but it does set a standard for how to proceed.

Added support for missing 3.1 schema properties, however it does not cover the `boolean` case
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.
@TristanSpeakEasy
Copy link
Contributor

LGTM

@daveshanley daveshanley merged commit 3fd088b into main Dec 9, 2022
@danielgtaylor
Copy link
Contributor

LGTM too, I'll take some time to upgrade Restish soon.

@daveshanley daveshanley deleted the issue28-contains branch June 19, 2023 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants