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

Improve canonicalisation when properties have no possible values #92

Closed
Zac-HD opened this issue Nov 9, 2021 · 0 comments
Closed

Improve canonicalisation when properties have no possible values #92

Zac-HD opened this issue Nov 9, 2021 · 0 comments

Comments

@Zac-HD
Copy link
Member

Zac-HD commented Nov 9, 2021

{'additionalProperties': {'not': {}},
 'maxProperties': 1,
 'properties': {'a': {'not': {}}},
 'type': 'object'}

is considered canonical, but because there are no possible values for the allowed property keys we should instead canonicalise to

{'maxProperties': 0, 'type': 'object'}

This is only valid with additionalProperties: false and no patternProperties, but in those cases we should omit unsatisfiable properties and decrement maxProperties accordingly.

@Zac-HD Zac-HD closed this as completed in 466c013 Nov 16, 2021
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

No branches or pull requests

1 participant