You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Issue is used to track changes needed to support AsyncAPI v3. As a code owner, please edit this list of TODO tasks in order to properly track the progress 🙂 Once this issue is closed it means that v3 is now fully supported in this library.
Potentially, disable certain commands if they don't support v3.
if(document.asyncapi === '3.0.0') { throw new Error('This command does not support AsyncAPI v3 yet, please see https://github.com/asyncapi/xxxxx/issues/xx')}
And then we can remove that check once the dependency has been updated with support for v3 in the specific tools?
That way we don't need any feature branch, nor worry about weird error codes from commands when you try to use an AsyncAPI v3 document for commands that don't yet support it.
@jonaslagoni Rather than throwing error we can inform (by some warning) about alpha support for 3.0 to test it earlier, so people can use cli for 3.0, however with the knowledge that something doesn't work/isn't supported/has bugs.
@jonaslagoni Rather than throwing error we can inform (by some warning) about alpha support for 3.0 to test it earlier, so people can use cli for 3.0, however with the knowledge that something doesn't work/isn't supported/has bugs.
So instead of stopping the call in it's track, you want to warn people that it might or might not work?
EDIT: However, having thought about it, your idea makes more sense. As there will be support in tolling we can immediately remove this error for the given command.
Yeah, I think we can throw a warning instead of an error for now, all command throws a warning but once the command is updated for 3.0 we can just remove the warnings for that command.
I'm immediately thinking how we can automate it, instead of manually adding warning/error where needed, then manually removing it. Maybe we can figure out a different way 🤔 Like an asyncapi property in a package, that says what versions it supports? so we have a generic solution that checks that flag and drops warning/error or not 🤔
@derberg I am all for automation, however for v3, I would stick with just failing the commands if v3 is not supported 😄 That way we don't have to rush into a solution but could target it for any next major versions of the spec.
@jonaslagoni yeah, definitely, I mean that instead of hardcoding it in CLI, we can agree on a setting in package.json of other dependencies, that we will have asyncapi property there (like we have with generator config). So in CLI we simply write a code:
user runs command
we fetch their asyncapi document
check version
check core package and its package.json if asyncapi is there
if asyncapi is there, we check version it supports
if asyncapi version do not have the version on the list, then fail
if asyncapi props is not there, we know it is a new thing and if package maintainer did not add it, it means it is not supporting given version
asyncapi key in package.json could be an array of versions, following semantic versioning rules that already work in dependencies with ^ and all these things.
we already have similar thing in generator, so your template can say what generator version it works with, why not have an option what asyncapi document your package works with 🤔
wait wait, are you having some personal goal to work on your assertiveness skills 😆
Great to have for next major release 💪
you know it doesn't make sense, right? right? 😆
it is an easy thing to do, we just need to agree on how should such an info be presented in package.json. If you are afraid that you will have to do it and drive discussion then I officially, hereby, confirm that I do not expect you do it 😄 and that I can start the public discussion and drive it forward 🍻
then write a check in each library (implemented by CLI) to throw this error
Update CLI to check for this error and show suitable error messages, (or maybe we don't need to do this and show the error thrown by the library itself)
Let me know how I can get started with this, also should we move this to a separate issue?
asyncapi/bundler#133 is marked as done and bundler 0.4.0 has been integrated into latest cli releases.
Is it expected that cli still display Error: One of the files you tried to bundle is AsyncAPI v3 format, the bundle command does not support it yet, please checkout https://github.com/asyncapi/bundler/issues/133? It's unclear to me if the explicit check introduced by #697 should be removed or if will be removed once all commands support v3.
Activity
jonaslagoni commentedon Jun 16, 2023
@Souvikns @magicmatatjahu @derberg @boyney123 would it make sense add something like the following check for each command:
And then we can remove that check once the dependency has been updated with support for v3 in the specific tools?
That way we don't need any feature branch, nor worry about weird error codes from commands when you try to use an AsyncAPI v3 document for commands that don't yet support it.
magicmatatjahu commentedon Jun 21, 2023
@jonaslagoni Rather than throwing error we can inform (by some warning) about alpha support for 3.0 to test it earlier, so people can use cli for 3.0, however with the knowledge that something doesn't work/isn't supported/has bugs.
jonaslagoni commentedon Jun 21, 2023
So instead of stopping the call in it's track, you want to warn people that it might or might not work?
magicmatatjahu commentedon Jun 21, 2023
@jonaslagoni Exactly.
EDIT: However, having thought about it, your idea makes more sense. As there will be support in tolling we can immediately remove this error for the given command.
jonaslagoni commentedon Jun 21, 2023
I am gonna prepare a PR tomorrow unless other join the discussion 🙂
Souvikns commentedon Jun 21, 2023
Yeah, I think we can throw a warning instead of an error for now, all command throws a warning but once the command is updated for 3.0 we can just remove the warnings for that command.
derberg commentedon Jun 22, 2023
I'm immediately thinking how we can automate it, instead of manually adding warning/error where needed, then manually removing it. Maybe we can figure out a different way 🤔 Like an
asyncapiproperty in a package, that says what versions it supports? so we have a generic solution that checks that flag and drops warning/error or not 🤔jonaslagoni commentedon Jun 26, 2023
@derberg I am all for automation, however for v3, I would stick with just failing the commands if v3 is not supported 😄 That way we don't have to rush into a solution but could target it for any next major versions of the spec.
derberg commentedon Jun 28, 2023
@jonaslagoni yeah, definitely, I mean that instead of hardcoding it in CLI, we can agree on a setting in
package.jsonof other dependencies, that we will haveasyncapiproperty there (like we have with generator config). So in CLI we simply write a code:package.jsonifasyncapiis thereasyncapiis there, we check version it supportsasyncapiversion do not have the version on the list, then failasyncapiprops is not there, we know it is a new thing and if package maintainer did not add it, it means it is not supporting given versionasyncapikey inpackage.jsoncould be an array of versions, following semantic versioning rules that already work independencieswith^and all these things.we already have similar thing in
generator, so your template can say what generator version it works with, why not have an option whatasyncapidocument your package works with 🤔jonaslagoni commentedon Jun 28, 2023
All makes sense to me 😄 Great to have for next major release 💪
derberg commentedon Jun 29, 2023
wait wait, are you having some personal goal to work on your assertiveness skills 😆
you know it doesn't make sense, right? right? 😆
it is an easy thing to do, we just need to agree on how should such an info be presented in
package.json. If you are afraid that you will have to do it and drive discussion then I officially, hereby, confirm that I do not expect you do it 😄 and that I can start the public discussion and drive it forward 🍻jonaslagoni commentedon Jun 29, 2023
Haha, please do then 💪 🎉
Souvikns commentedon Jul 12, 2023
@derberg I like this idea of having flags at the library level to prevent CLI from running the command and outputting meaningful error messages if the library does not support the current spec version. I want to help build this. I watched https://www.youtube.com/watch?v=hc0Lxr3G8T4 and what I understood is that we do hardcoding now but then update it in the future.
So for now we:
Let me know how I can get started with this, also should we move this to a separate issue?
derberg commentedon Jul 25, 2023
@Souvikns best would be to start new issue
smoya commentedon Aug 23, 2023
FIrst iteration on supporting v3 for validating docs #770
cykl commentedon Jan 29, 2024
asyncapi/bundler#133 is marked as done and bundler 0.4.0 has been integrated into latest cli releases.
Is it expected that cli still display
Error: One of the files you tried to bundle is AsyncAPI v3 format, the bundle command does not support it yet, please checkout https://github.com/asyncapi/bundler/issues/133? It's unclear to me if the explicit check introduced by #697 should be removed or if will be removed once all commands support v3.Anyway, it's confusing for users.
jonaslagoni commentedon Jan 30, 2024
@cykl if you have a spare minute please help remove the hard coded check if the bunder support it and have been updated here ✌️
Amzani commentedon Jun 6, 2024
@jonaslagoni I think we can close this as https://github.com/asyncapi-archived-repos/cupid is archived
jonaslagoni commentedon Jun 6, 2024
Lets close as soon as we enable v3 for Modelina in #1376
Amzani commentedon Jul 5, 2024
@jonaslagoni we can close this ?
jonaslagoni commentedon Jul 5, 2024
Yep 😊