DataDesigner/packages/data-designer-engine/tests/engine/processing/gsonschema
Andre Manoel 3f8d735b23
fix: handle discriminated unions in oneOf pruning validator (#376)
* fix: handle discriminated unions in oneOf pruning validator

The pruning validator modifies instances in-place during oneOf
validation. When trying a wrong variant, it strips properties needed
by the correct variant, causing all variants to fail.

Add a discriminator-aware oneOf validator that reads the discriminator
mapping to select the correct variant directly, skipping the
try-all-variants loop that causes the corruption.

Fixes #375

* test: add regression test for non-discriminated oneOf fallback
2026-03-06 17:11:01 -03:00
..
__init__.py refactor: slim package refactor into three subpackages (#240) 2026-01-27 13:53:20 -05:00
test_exceptions.py chore: add publish script and update license headers (#253) 2026-01-28 08:47:34 -05:00
test_schema_transformers.py chore: add publish script and update license headers (#253) 2026-01-28 08:47:34 -05:00
test_types.py chore: add publish script and update license headers (#253) 2026-01-28 08:47:34 -05:00
test_validators.py fix: handle discriminated unions in oneOf pruning validator (#376) 2026-03-06 17:11:01 -03:00