Skip to content

feat: support unevaluatedProperties in Draft 2019-09 - #931

Open
tomatotomata wants to merge 4 commits into
jsonrainbow:mainfrom
tomatotomata:codex/unevaluated-properties
Open

feat: support unevaluatedProperties in Draft 2019-09#931
tomatotomata wants to merge 4 commits into
jsonrainbow:mainfrom
tomatotomata:codex/unevaluated-properties

Conversation

@tomatotomata

@tomatotomata tomatotomata commented Aug 6, 2026

Copy link
Copy Markdown

Summary

This adds a focused proof of concept for unevaluatedProperties in Draft 2019-09, following the scope discussed in #907.

The implementation derives evaluated property names from properties, patternProperties, and direct allOf branches. That covers the motivating composition while keeping the first patch small. When unevaluatedProperties is a schema, each remaining property is validated against it. When it is false, the validator reports the property with a dedicated constraint error.

The validator does not yet carry annotations across every applicator, so this intentionally does not claim complete Draft 2019-09 semantics for anyOf, oneOf, conditionals, or referenced schemas. I would treat this as a proof of concept for the project to shape further.

Tests

  • php -d extension=mbstring -d extension=openssl vendor/bin/phpunit --filter UnevaluatedPropertiesTest --testdox passes locally (2 assertions-backed cases, 2 expected skips for the assoc/type-cast variants).
  • PHPStan passes for the new constraint.
  • git diff --check passes.
  • The pre-existing full-suite run reaches the suite but has an unrelated Windows path-separator failure; the original CI run also exposed the missing Draft 2019 strict-mode flag in this new test, which is fixed in the follow-up commit.

This patch was prepared with AI assistance and then reviewed and tested in this checkout. The repository's contribution notice asks contributors to have authored 100% of the content, so please let me know if the project needs a different treatment of that requirement before considering the patch.

Updates #907

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