Skip to content

Fix calculation of evaluated properties #1351

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

V02460
Copy link

@V02460 V02460 commented Apr 24, 2025

Fixes a problem with the interplay of additionalProperties and unevaluatedProperties. Test case included.

Instance properties which are valid under the additionalProperties schema should be considered evaluated and thus never be invalid under unevaluatedProperties.

The old code assumes identical structure for the properties keyword as for additionalProperties and unevaluatedProperties, producing a wrong list of evaluated keys for the latter two (when set to non-boolean subschemas). According to the spec, the properties keyword must always be an object with property names as keys; additionalProperties and unevaluatedProperties must each contain a subschema.

Related PR: json-schema-org/JSON-Schema-Test-Suite#755


📚 Documentation preview 📚: https://python-jsonschema--1351.org.readthedocs.build/en/1351/

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.

1 participant