Azure / autorest.powershell

AutoRest PowerShell Generator
MIT License
112 stars 83 forks source link

Positional Parameter Support #297

Open markcowl opened 5 years ago

markcowl commented 5 years ago
fearthecowboy commented 5 years ago

Need configuration to declare this and changes to the cmdlet generator.

dolauli commented 5 years ago

p3

isra-fel commented 1 year ago

@JimMoyle from Desktop Virtualization team is also wanting to support this. We should re-evaluate it. cc @dolauli

JimMoyle commented 1 year ago

From our PowerShell standards docs:

Good cmdlet design recommends that the most-used parameters be declared as positional parameters so that the user does not have to enter the parameter name when the cmdlet is run.

Any parameter called 'Name' is often a good candidate, as are parameters that take in an array rather than single property.

https://learn.microsoft.com/en-gb/powershell/scripting/developer/cmdlet/types-of-cmdlet-parameters?view=powershell-7.3#positional-and-named-parameters

Our docs say, as mentioned above that we shouldn't have more than 4 positional parameters total.