fix: wrong type of payload and headers in MessageExample#3531
fix: wrong type of payload and headers in MessageExample#3531asyncapi-bot merged 5 commits intoasyncapi:masterfrom
Conversation
According to JSON Schema headers and payload properties may be of any type asyncapi#3530
WalkthroughThe pull request updates the AsyncAPI Specification documentation for the Message Example Object. Specifically, the changes modify the type declaration for the Changes
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 180000ms (1)
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3531 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 667 667
Branches 113 113
=========================================
Hits 667 667 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-3531--asyncapi-website.netlify.app/ |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
markdown/docs/reference/specification/v3.0.0.md (1)
1338-1339: LGTM! The type change correctly aligns with JSON Schema specifications.The change from
Map[string, any]toanyfor bothheadersandpayloadfields is correct as it:
- Aligns with JSON Schema's flexibility
- Supports real-world use cases where headers/payload might be primitives, arrays, or other non-object types
- Fixes the type constraint that was incorrectly limiting these fields to only object types
Consider adding an example in the Message Example Object Example section that demonstrates non-object types for headers and payload, such as:
name: SimpleMessage summary: Example with non-object types headers: "correlation-123" # string header payload: 42 # number payload
Rollback headers to Map[string, any]
|
@TRohit20 I have returned |
|
@TRohit20 PTAl |
…)" This reverts commit ac42663.
According to JSON Schema headers and payload properties may be of any type
Fixes #3530
Summary by CodeRabbit
payloadfield to allow more flexible message example structures.