-
-
Notifications
You must be signed in to change notification settings - Fork 723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: wrong type of payload and headers in MessageExample #3531
base: master
Are you sure you want to change the base?
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 declarations for Changes
Assessment against linked issues
Poem
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 19 19
Lines 668 668
=========================================
Hits 668 668 ☔ View full report in Codecov by Sentry. |
⚡️ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]
toany
for bothheaders
andpayload
fields 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
According to JSON Schema headers and payload properties may be of any type
Fixes #3530
Summary by CodeRabbit
headers
andpayload
fields to provide more flexibility in message example structures