-
-
Notifications
You must be signed in to change notification settings - Fork 54
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: examples of messages should not follow json schema #434
fix: examples of messages should not follow json schema #434
Conversation
Kudos, SonarCloud Quality Gate passed! |
There is something I should be missing because when I read the following in the spec:
With that statement, I understand that it should stay as it is, with the |
but the spec says map of string and any, so no, it should not stay as it is. As not we expect that in example of the payload, people should provide schema, while it should be an example of payload that is valid with with the schema provided in payload now, if my payload is
my example must be
which makes no sense as I want my example to be
|
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.
You are right, examples should not have those references 😄
Yeah, that totally makes sense from the usability point of view. I completely misunderstood those statements by thinking they were the same in terms of validation than the object they represent. |
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! 🚀🌔 Thanks for this catch and thanks for clarifying something might sound obvious 🙌
Thanks @jonaslagoni and @smoya for quick review 🍺 /rtm |
🎉 This PR is included in version 6.0.0-next-major-spec.10 🎉 The release is available on: Your semantic-release bot 📦🚀 |
#370 introduced bug in Message Object JSON schema
examples
headers
andpayload
should not follow json schema specjust like in previous versions these fields need to be flexible as
payload
orheaders
are no necessarily json, could be avro for examplenoticed with https://github.com/asyncapi/spec/blob/next-major-spec/examples/websocket-gemini.yml
I checked the change locally and works like a charm