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
{{ message }}
Repository navigation
Always follow the same structure (verb + noun, noun + verb, or namespace + verb + noun) #37
I think we should be following a structure, regardless of the command at hand. For instance:
asyncapi validate file
Is following the verb + noun approach. Whereas:
asyncapi context add
Is reversing it to noun + verb.
In #1, I suggested we use verb + noun because it reads naturally. However, after thinking about how to flip contexts and how to occasionally evolve them to accept multiple asyncapi files, it seems the noun + verb might work better here. Just like the Github CLI. So for instance, if I want to add one more asyncapi file to a context, how would it be?
asyncapi add context # that sounds like adding a context not "adding to" a context
asyncapi add-to context # clear but ugly
So maybe it's a better idea to go for something like:
asyncapi context add # Creates a context
asyncapi context add file # Adds a file to a context
In this case, the structure would be something like noun + verb + [noun] (being the last noun optional). To avoid confusion, I suggest we call it namespace + verb + [noun] because the first noun actually works like a namespace.
I suggested asyncapi context add and others as it feels very natural when I use the same approach with GitHub CLI. I just think the verbs might be very different per noun, so verb + noun would be very strange here.
the problem is that sometimes there is just no noun, like validate or generate, so general rule sound like noun? + verb
I case kubectl or github cli, stuff similar to context, go under config verb actually so it is either kubectl config get-context or gh config set editor vim. I think we should follow, as in our case context is pure config related, having it on the "root" may confuse it has anything to do with the AsyncAPI-related functionalities
We need asyncapi + verb no matter of above 😄 as context would go under config, config can be verb or noun 😄 we win as validate is verb 🤷🏼
would be asyncapi config context add {CONTEXT_NAME} {FILE_PATH}, now it is asyncapi context add {CONTEXT_NAME} {FILE_PATH}. To follow asyncapi + verb in case of app-replations-finder aka cupid we would need asyncapi find-relations or something similar, asyncapi relate?
Just as @fmvilas said context is not a verb so asyncapi context add is breaking the (verb + noun) rule and everything else is following it. Could we name the context commands something like this
@Souvikns I proposed asyncapi config context add instead of asyncapi add-context as I'm simply afraid of those hyphened commands 😄 It is like this with kubectl probably also to satisfy some main rule, but not very intuitive. This is why I'm more into having config verb there. Config will not only be for context. For future, where we add more functionality, like asyncapi edit channel mychannel and open and editor like nano or vim, we will need some stuff under config to configure these editors
please split it into 2 PRs, one for moving context into config. Then another one about removing file and context flag, as I thought we agreed that technically we can remove the context flag too, right?
This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Activity
derberg commentedon Jul 27, 2021
I suggested
asyncapi context addand others as it feels very natural when I use the same approach with GitHub CLI. I just think the verbs might be very different per noun, soverb + nounwould be very strange here.the problem is that sometimes there is just no
noun, likevalidateorgenerate, so general rule sound likenoun? + verbfmvilas commentedon Aug 4, 2021
Yeah, that's true. Maybe we should still consider the
namespaceand make it something like[namespace] + verb + [noun]? Just throwing ideas.derberg commentedon Aug 5, 2021
I have to say I'm not fully getting the
namespaceidea. What would it be?fmvilas commentedon Aug 5, 2021
Like in this case:
It's different than:
The first one adds an AsyncAPI file to the context, the second one adds a context. The first one is, for instance, if we want to have tools like https://github.com/asyncapi/app-relations-discovery in the CLI. In that case, you don't want to manually specify all the files because they could potentially be hundreds. Does it make sense?
derberg commentedon Aug 17, 2021
I case kubectl or github cli, stuff similar to context, go under
configverb actually so it is eitherkubectl config get-contextorgh config set editor vim. I think we should follow, as in our case context is pure config related, having it on the "root" may confuse it has anything to do with the AsyncAPI-related functionalitiesWe need
asyncapi + verbno matter of above 😄 as context would go under config, config can be verb or noun 😄 we win asvalidateis verb 🤷🏼fmvilas commentedon Aug 19, 2021
So what would be an example? Something like:
Is it what you mean?
derberg commentedon Aug 23, 2021
would be
asyncapi config context add {CONTEXT_NAME} {FILE_PATH}, now it isasyncapi context add {CONTEXT_NAME} {FILE_PATH}. To followasyncapi + verbin case of app-replations-finder aka cupid we would needasyncapi find-relationsor something similar,asyncapi relate?Souvikns commentedon Aug 27, 2021
Just as @fmvilas said context is not a verb so
asyncapi context addis breaking the (verb + noun) rule and everything else is following it. Could we name the context commands something like thisIt kind of follows the (verb + noun ) rule. What do you think ? @fmvilas @derberg
derberg commentedon Aug 30, 2021
@Souvikns I proposed
asyncapi config context addinstead ofasyncapi add-contextas I'm simply afraid of those hyphened commands 😄 It is like this with kubectl probably also to satisfy some main rule, but not very intuitive. This is why I'm more into havingconfigverb there. Config will not only be for context. For future, where we add more functionality, likeasyncapi edit channel mychanneland open and editor like nano or vim, we will need some stuff under config to configure these editorsSouvikns commentedon Aug 30, 2021
Will open a PR for this just to summarize the task,
--contextflag.derberg commentedon Aug 30, 2021
please split it into 2 PRs, one for moving context into
config. Then another one about removing file and context flag, as I thought we agreed that technically we can remove the context flag too, right?derberg commentedon Sep 7, 2021
so, we have an agreement here, right?
github-actions commentedon Jan 6, 2022
This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience ❤️
fmvilas commentedon Jan 7, 2022
I'd say so. We probably have to document it somewhere in the repo. WDYT?
derberg commentedon Jan 12, 2022
I think what we have here is enough -> https://github.com/asyncapi/cli#command-structure-and-patterns