Skip to content

Enforce required tags on fields inside slice elements - #248

Open
gyanu2507 wants to merge 1 commit into
gorilla:mainfrom
gyanu2507:fix/required-in-slice-elements
Open

Enforce required tags on fields inside slice elements#248
gyanu2507 wants to merge 1 commit into
gorilla:mainfrom
gyanu2507:fix/required-in-slice-elements

Conversation

@gyanu2507

@gyanu2507 gyanu2507 commented Sep 1, 2026

Copy link
Copy Markdown

fixes #204

findRequiredFields walked nested structs but not []T where T is a struct. bars.0.baz with required was never checked, so a missing baz decoded as empty with no error.

Collect indices present under that prefix in the source map and recurse into each element.

@gyanu2507

Copy link
Copy Markdown
Author

The failing add-to-project job is an org/project-board permission check, not a test failure for this patch.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Nested struct with required field is not failing on decode

1 participant