Skip to content

fix(validation): reject empty metadata.annotations in manifest#779

Open
madmecodes wants to merge 1 commit into
wasmCloud:mainfrom
madmecodes:fix/empty-annotations-validation
Open

fix(validation): reject empty metadata.annotations in manifest#779
madmecodes wants to merge 1 commit into
wasmCloud:mainfrom
madmecodes:fix/empty-annotations-validation

Conversation

@madmecodes

Copy link
Copy Markdown

Summary

  • Add serde(default) to Metadata.annotations so a null YAML value deserializes without error, allowing validation to run
  • Add validate_metadata_annotations check in raw YAML validation to reject manifests where metadata.annotations is present but null or an empty mapping
  • Add test case and fixture for the empty annotations scenario

Fixes #676

Test plan

  • cargo test -p wadm-types passes
  • cargo test --test validation validate_empty_annotations passes, confirming the manifest is correctly rejected
  • Existing tests unaffected

@madmecodes madmecodes requested a review from a team as a code owner May 7, 2026 05:32
Signed-off-by: madmecodes <ayushguptadev1@gmail.com>
@madmecodes madmecodes force-pushed the fix/empty-annotations-validation branch from 7d3ee00 to 34852a1 Compare May 8, 2026 01:49
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.

[BUG] Empty metadata.annotations passes validation

1 participant