Skip to content

Union setTag should *not* initialise array defaults - #104

Merged
mikee47 merged 1 commit into
developfrom
fix/dont-init-array-defaults
Aug 27, 2026
Merged

Union setTag should *not* initialise array defaults#104
mikee47 merged 1 commit into
developfrom
fix/dont-init-array-defaults

Conversation

@mikee47

@mikee47 mikee47 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

This PR corrects inconsistent behaviour when setTag is called on a Union, and therefore any of the generated toXXX methods.

If an Array is selected then any default specified in the schema should not be loaded.
This is done explicitly via loadArrayDefaults as noted in the documentation.

@mikee47 mikee47 changed the title Union setTag (and thus toXXX) should *not* initialise array defaults Union setTag should *not* initialise array defaults Aug 27, 2026
@mikee47
mikee47 merged commit 1aadc2c into develop Aug 27, 2026
18 checks passed
@mikee47
mikee47 deleted the fix/dont-init-array-defaults branch August 27, 2026 16:18
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