-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat: make channels optional #146
Conversation
Kudos, SonarCloud Quality Gate passed! |
Is this not a breaking change? 🤔 |
If we switch optional to required then yes, but switching required -> optional won't break any AsyncAPI document. |
If tooling expects channels to always be present, would that not break them? |
In can be "breaking change" in such a cases, but for example in the |
I would say so yes, especially since we are driven by tools. Just because our JS parser allows such a thing does not mean we should assume it won't be a problem elsewhere. However, kinda out of scope for this PR. Gonna create a new issue with a potential solution. |
I would say more that it's a breaking change on the tooling side and not the specification itself :) |
Remember we do have |
While that is true, having support functions in a specific parser implementation does not remove the underlying problem 😄 One could ask why we even has such a function 😆 Added an issue: asyncapi/spec#688 |
Hello, @jonaslagoni! 👋🏼 I'm Genie from the magic lamp. Looks like somebody needs a hand! 🆘 At the moment the following comments are supported in pull requests:
|
@derberg your bot is acting weird! 😨 |
show some respect, bots that I train have feelings! tbh, there is a bug (asyncapi/.github#121 (comment)) but this is super random, if the bug mentioned by me is really causing it, it should do it every time someone creates a comment, and not randomly 🤷🏼 anyway, thanks for 🏓 @jonaslagoni |
I did a quick search at the very beginning of me creating this issue and didn't find any possible breaking change among our official tools. Did you find anything I missed? |
Hello, @smoya! 👋🏼 I'm Genie from the magic lamp. Looks like somebody needs a hand! 🆘 At the moment the following comments are supported in pull requests:
|
This would fail: https://github.com/asyncapi/asyncapi-react/blob/master/library/src/containers/Channels/Channels.tsx#L26 |
What do you mean by "fail"? If you meant an error when executing, and as far as I understand, it won't enter the map function. I wrote a fiddle here to test it anyway https://jsfiddle.net/smoyac/9jhpnk6y/5/ I'm not saying we should or shouldn't consider it a breaking change. If our scope is all possible tools (not only those under AsyncAPI GH org), its fine. |
What I mean is that |
Regarding to this line, please have in mind that it would be checked in the main component if channels exist or not -> https://github.com/asyncapi/asyncapi-react/blob/master/library/src/containers/AsyncApi/AsyncApi.tsx#L123 So if someone won't write any channel it will work, even if someone will write Of course other tools may have problems with this, but react component handles this problem :) |
Yeah, our parser has a defense there. Still, we don't know what other parsers would do. AFAIK, there are parsers created by Mulesoft and WSO2. They could be easily assuming it's never going to be undefined because they validate it before but they don't transform |
By what we are talking here, Is it now clear we advocate for considering breaking changes any change that might break any tool around the world. I'd suggest we move our efforts to asyncapi/spec#688 and build a strong ruleset and guidelines so we don't need to worry about what is a breaking change or not anymore (likely). |
/dnm |
I agree better move to 3.0 and consider it a breaking change |
Description
Part of asyncapi/spec#661.
This PR removes
channels
from the required fields on the root of the document, meaningchannels
is not required to be present anymore.Related issue(s)
asyncapi/spec#661