Repository navigation
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.
what happens when I pass in a custom template that does not support v3?
There was a problem hiding this comment.
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.
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.
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 🙂
Souvikns
left a comment
There was a problem hiding this comment.
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 😄 |
derberg
left a comment
There was a problem hiding this comment.
some templates need to be added
|
Kudos, SonarCloud Quality Gate passed!
|
|
/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
asyncapiproperty.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