Skip to content

fix: enforce complex field structure and preserve nullable items - #80

Draft
plamen-neykov wants to merge 1 commit into
mainfrom
fix/complex-field-validation
Draft

plamen-neykov wants to merge 1 commit into
mainfrom
fix/complex-field-validation

Conversation

@plamen-neykov

Copy link
Copy Markdown
Contributor

Complex model metadata validators bypassed Pydantic's field schema,
allowing scalar/list mismatches and invalid list cardinalities.
They also rejected None entries in explicitly nullable model lists.

Replace the whole-field validator with a schema-aware annotation that
applies Rune deserialization to individual model values. Pydantic
continues to enforce container structure, cardinality and nullability.

Preserve subtype identity and per-occurrence reference metadata,
including COW lists. Existing generated validator() calls remain
compatible.

Add regression coverage for standalone and bundled annotations,
construction, Python/JSON validation, Rune deserialization, revalidation
and reference metadata preservation.

Related: finos/rune-python-generator#332

Validation

  • Generator Python suite: 446 passed.
  • Tracked runtime suite: 737 passed, 19 skipped.
  • git diff --check: passed.

Apply Rune decoding to individual model values while retaining
Pydantic's shape, cardinality and nullability checks.

Preserve subtype identity, reference occurrence metadata and COW
list support.
@plamen-neykov plamen-neykov self-assigned this Nov 17, 2026
@plamen-neykov plamen-neykov added the bug Something isn't working label Nov 17, 2026
@github-actions

Copy link
Copy Markdown

Test Results

756 tests  +62   736 ✅ +62   2s ⏱️ -1s
  1 suites ± 0    20 💤 ± 0 
  1 files   ± 0     0 ❌ ± 0 

Results for commit 3d3aef8. ± Comparison against base commit e9c7dd3.

@plamen-neykov
plamen-neykov marked this pull request as draft November 17, 2026 16:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant