Replies: 2 comments 2 replies
-
Hi @samcragg yes, you are correct, the workspace experience was modeled after npm and other similar package management experiences. There's more complexity to it though in terms of parameters. This is also why the add command generates by default. When using the npm install command with a package name, you expect it to install the package right away, not to have to run a separate install command after. Have you seen the The philosophy of the CLI experience is that you should be able to do everything you can do through the configuration files or any UI, through the command line. We're not planning on making the CLI a subpar experience. Let's park the discussion around required things in OAS in #3911 Let us know if you have further questions/concerns. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply and for correctly pointing out that npm install does the install too (similar to dotnet add, which restores too but has the option option not to). That makes sense. I'd still question the need for the edit command though - once you've called add won't you have a json file that you can edit? Unfortunately, I'm struggling to try the command out even with the
The OpenAPI json file I'm pointing to does work with the normal |
Beta Was this translation helpful? Give feedback.
-
I've just tried out some of the experimental workflow commands (introduced in #3356) and the flow wasn't quite what I was expecting so thought I'd start a discussion if that's okay, as it's such a great feature that would help me as a developer.
For background, although my strengths are back end C# code, I do work with a React front end project daily for work. Therefore, my initial mental model for how the workspace feature would work was along the lines of
npm
style tool where you initialise it and then modify the generated config file.However, when adding a client to the workspace it also generates it. This forces the need to use the multitude of command line options for each setting. It also means there's an
edit
command for changing these settings.Is there any desire to move away from the command line options and use the config file instead for these customisations, only having the bare minimum on the command line? Calling
client add
would still need the name and language, but it could create the config with all the defaults for that client. Once the developer has tweaked the file they would have to explicitly callgenerate
(which already exists) to create the client.The reason for this is discoverability; it's a lot easier to see all the options and their defaults in the file than having to read the docs.
It would also make it easier to add more customisation to the tool (I can't quite use it yet due to it not supporting
required
from the Open API spec and one of the reasons against adding that option was it would increase the complexity of the command line).Just thought I'd raise it now, as these are new options so would be great to have the discussion now before they're released.
Beta Was this translation helpful? Give feedback.
All reactions