platyPS icon indicating copy to clipboard operation
platyPS copied to clipboard

Update the YAML schema

Open adityapatwardhan opened this issue 3 years ago • 4 comments

PR Summary

Updated the schema as per the discussion

PR Context

adityapatwardhan avatar Jun 29 '22 19:06 adityapatwardhan

parameterItems' properties:

  • summary: It has not been used anywhere and can be deleted.
  • parameterValueGroup: accepted values (it is also in PlatyPS-MamlParameter.cs)
  • valueFrom: I cannot find an example with this, but this page may be related, see the last parameter. It is a defined Property/YamlMember but has not been used in the code, while it is in the powershell template. But AzureCLI has it, which contains a command, the output of running this command will be accepted values (in other words, the output of this 'valueFrom command' should be the acceptable value of the parameter); if PowerShell does not need it, we can consider to remove it.

xmdanni avatar Jun 30 '22 14:06 xmdanni

  1. I removed the summary property.
  2. Are you sure parameterValueGroup is used for accepted values? From the link you provided I could not infer that.
  3. valueFrom seems like it is accepted values. Example: Authentication parameter here: https://docs.microsoft.com/en-us/powershell/module/cimcmdlets/new-cimsession?view=powershell-7.2#parameters

adityapatwardhan avatar Jul 08 '22 17:07 adityapatwardhan

@adityapatwardhan

  • parameterValueGroup

I tested this and it is the accepted values. I can't find anything that uses valueFrom.

sdwheeler avatar Jul 08 '22 18:07 sdwheeler

I am pushing a change to remove summary and valueFrom. We added parameterSetName to capture the string which has the list of parameter sets the parameter belongs to.

adityapatwardhan avatar Jul 08 '22 18:07 adityapatwardhan