-
-
Notifications
You must be signed in to change notification settings - Fork 164
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: add v3 checks for all commands #697
Conversation
if (v3IssueLink !== undefined) { | ||
this.error(`${template} template does not support AsyncAPI v3 documents, please checkout ${v3IssueLink}`); | ||
} | ||
} |
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.
what happens when I pass in a custom template that does not support v3?
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.
Nothing, we cant expect the unexpected 🙂
Custom templates can easily be added to the list of templates that don't support v3, so all about contributing 😄
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.
Nothing, we cant expect the unexpected 🙂
Yeah, that make sense.
I was thinking that since templates have a config in the package.json
they might have a parameter that could help us determine which spec versions this template supports, but now that I have checked I don't think there is anything like that.
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.
In the future for sure, as you folks discussed in #629, each tools should have that configured, but it would be a rush to implement it now right before v3, so this is just a temporary solution until something better comes along 🙂
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, just had that one doubt
@Souvikns anyone else need to review it or can we merge it? |
Yeah, you can merge, it is up to you. |
Not really up to me, it's your folks repo, I am just suggesting a change like any other contributor @Souvikns 😄 But if you say go ahead and merge then I wont stop 😄 |
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.
some templates need to be added
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
@Souvikns need another approval. Once you approve, just merge
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/rtm |
🎉 This PR is included in version 0.51.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
This PR adds v3 checks for most commands, and give an error if the command does not support v3:
I left out the following commands, because I don't think they are relevant to shelter:
It does so by peaking into the spec document and checking the
asyncapi
property.These checks are only temporary and another approach in the future is probably needed as discussed in #629, but this change is to ensure CLI is ready whenever v3 is released.
Related issue(s)
Related to #629