Repository navigation
feat: change from flags to arguments when passing path to a file or context name - #59
Conversation
|
@Souvikns fyi GitHub has option to create a |
|
@derberg should I make this a draft now? |
|
Nah, it's ok, just remember next time, so you do not have to add any disclaimer in the description that PR is wip |
Still missing support for URL and proper error messaging
|
@derberg I am ready for review. Working on this PR I think the |
|
@Souvikns don't forget about docs and help commands 😉 as for the |
search in project for any mention of |
|
When you do Now |
yes, but we need to have in place validation of options and notify users if they use not existing options, so we do not do what we think is better for users but tell what's wrong. You know what I mean? can be done as follow-up as this could be supported also by https://www.npmjs.com/package/levenshtein-edit-distance to not only tell users the command is wrong, but also try suggesting the correct one |
This is a good idea user experience will certainly increase. I will open a follow-up issue for this.
This is error message that is being used in the validate component, It is also being reused for other instances where spec path is incorrect.
This is the new updated error before, it use to show that `file path does not exist. Do you reckon this could be improved, maybe with some ❌ icon in the beginning or something? And for now I will update any document that mentions |
|
@Souvikns awesome, lemme know once you need me for another review round |
…ith new help messages
derberg
left a comment
There was a problem hiding this comment.
🔥 🚀
You can merge it on your own. Make sure the commit that you will use when using squash&merge reflects the one from PR title
![]()
|
Kudos, SonarCloud Quality Gate passed!
|
|
🎉 This PR is included in version 0.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |








Description
In this PR I am trying to shift from
--fileflag to input so now the validate command will look something like this -asyncapi validate <file-path|urlcontext-name>. As of now, we were relying on theuseSpecFilehook to load the spec file according to availability. It was built in a way that any command in the future could use it load the spec file as all commands depend on the spec file in some way since we were using the--fileflag. Now when we are shifting from flags to input, this hook is not needed.Also, other commands will have different needs for accessing inputs. So I think we would be needing to create different hooks to load the spec file according to that specific command.
Amidst all this, some logic would be reusable like
Related issue(s)
See also #37