Skip to content
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: message can have nested oneOf #333

Conversation

jonaslagoni
Copy link
Member

@jonaslagoni jonaslagoni commented Feb 9, 2023

Description
This PR fixes the nested oneOf problem.

Once we agree this is the fix, then I will apply it for the rest of the versions as well.

I think this will be a breaking change 🧐

Solves #332

Copy link
Member

@magicmatatjahu magicmatatjahu left a comment

Choose a reason for hiding this comment

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

Please also remember to update references to new messageObject in all places like https://github.com/asyncapi/spec-json-schemas/blob/8c9f3d72fa20d82fa7045ca5cec8e318d42e8e6e/definitions/3.0.0/channelMessages.json and also in components.

However, in 3.0.0 we don't have such a oneOf messages, we have objects like channel.messages or operation.messages (which is a array of messages) so your change should be done only for 2.x.x :) We have a bug in 3.0.0 schemas.

@jonaslagoni
Copy link
Member Author

Please also remember to update references to new messageObject in all places like https://github.com/asyncapi/spec-json-schemas/blob/8c9f3d72fa20d82fa7045ca5cec8e318d42e8e6e/definitions/3.0.0/channelMessages.json and also in components.

Those should not be changed in this PR as it has nothing to do with this bug fix 🙂

@magicmatatjahu lets make further changes to the schema files regarding 3.0 after this one, lets's not mix multiple different changes in one.

@jonaslagoni
Copy link
Member Author

But yea, components need to change 👍

@jonaslagoni
Copy link
Member Author

@magicmatatjahu never mind, thats actually another bug 🤣 Gonna do that in another PR after this one

@jonaslagoni
Copy link
Member Author

Created a separate issue for it: #335

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json"
}

Choose a reason for hiding this comment

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

missing EOF

Copy link
Member Author

Choose a reason for hiding this comment

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

It is just a notice from GitHub, incase it's relevant for your setup to have newlines at the end of files, in this case I am pretty sure it's not 🙂

@derberg
Copy link
Member

derberg commented Feb 22, 2023

/rtm

@asyncapi-bot asyncapi-bot merged commit a2f0bb7 into asyncapi:next-major-spec Feb 22, 2023
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 5.0.0-next-major-spec.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 6.0.0-next-major-spec.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants