fix: close explicitly open composition branches in strict mode - #77
Open
FanouZeng-TT wants to merge 1 commit into
Open
fix: close explicitly open composition branches in strict mode#77FanouZeng-TT wants to merge 1 commit into
FanouZeng-TT wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Strict mode uses
unevaluatedProperties: falseon composition parents soproperties declared across
allOfbranches can coexist. A direct branch thatexplicitly keeps
additionalProperties: truedefeats that closure:{ "allOf": [ { "type": "object", "properties": { "id": { "type": "string" } }, "additionalProperties": true } ] }The branch marks every unknown property as evaluated, leaving nothing for the
parent's
unevaluatedProperties: falseto reject. This lets fields removed byUCP operation annotations back into strict validation, as reported in #69.
Fix: remove an explicit
additionalProperties: truefrom direct compositionbranches in strict mode. Branches without the keyword remain untouched, so
properties declared by sibling branches still compose normally. The regression
asserts that a valid cross-branch payload passes while an extra unknown property
is rejected.
Category (Required)
Related Issues
Fixes #69
Checklist
generate_models.shunder python_sdk (not applicable).Screenshots / Logs (if applicable)
cargo test— 158 unit, 81 CLI, 27 conformance, 19 container, 69 resolver, and 1 doc test passedcargo clippy --all-targets --all-features -- -D warnings— passedcargo fmt --all -- --check— passeduvx pre-commit run --all-files— all 11 hooks passedgit diff --check— passed🤖 Generated with Claude Code