Skip to content

fix: clarify null value handling in traits merge mechanism#1188

Closed
sahaiash wants to merge 2 commits intoasyncapi:masterfrom
sahaiash:fix/1178-handle-null-values-trait-merge
Closed

fix: clarify null value handling in traits merge mechanism#1188
sahaiash wants to merge 2 commits intoasyncapi:masterfrom
sahaiash:fix/1178-handle-null-values-trait-merge

Conversation

@sahaiash
Copy link
Copy Markdown

@sahaiash sahaiash commented Mar 19, 2026

Summary

  • Fixes Handling null values in the trait merge mechanism #1178
  • Adds explicit clarification that null values in traits or target objects MUST be preserved as-is
  • null MUST NOT be interpreted as a deletion directive (unlike standard JSON Merge Patch semantics)
  • Added a Null Value Example section under Traits Merge Mechanism with two clear examples

Changes

  • spec/asyncapi.md — updated the Traits Merge Mechanism section (line ~2707) with a clarifying sentence and null value examples

Test plan

  • Spec markdown lints cleanly
  • Embedded examples validate via npm run validate:examples
  • New null value examples are clear and consistent with the rule stated

🤖 Generated with Claude Code

Resolves asyncapi#1178 by explicitly stating that null values in traits or
target objects MUST be preserved as-is and MUST NOT be interpreted
as deletion directives, regardless of JSON Merge Patch semantics.
Added null value examples to the Traits Merge Mechanism section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@sonarqubecloud
Copy link
Copy Markdown

@derberg
Copy link
Copy Markdown
Member

derberg commented Mar 26, 2026

@sahaiash thanks but atm I have to close the PR. We first need to discuss what the best approach is before we jump into PR

@derberg derberg closed this Mar 26, 2026
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.

Handling null values in the trait merge mechanism

2 participants