PsCmdletHelpEditor icon indicating copy to clipboard operation
PsCmdletHelpEditor copied to clipboard

Support for ValidateSetAttribute and AliasAttribute in XML output

Open jalliot opened this issue 9 years ago • 4 comments

Hello Vadims,

It seems like the possible values from the ValidateSetAttribute and potential parameters aliases (even though they seem to be correctly retrieved in the tool's UI) are not used when the XML help file is generated. For the ValidateSet for instance, this results in the syntax not showing the possible values and instead just showing [String]

jalliot avatar Jun 13 '16 14:06 jalliot

ValidateSetAttribute and aliases are not parts of MAML help, they are parts of command metadata. Syntax is generated by PowerShell on-fly automatically.

Crypt32 avatar Jun 13 '16 14:06 Crypt32

If you look at C:\Windows\System32\WindowsPowerShell\v1.0\en-US\Microsoft.PowerShell.Commands.Utility.dll-help.xml for instance, lines 33-40 (from a Win8.1 machine with WMF5 installed, that may move in other versions) you can find an example of the possible values for a parameter, using a command:parameterValueGroup tag. Note that this comes from the syntax section but it seems also supported in the parameters section.

As for aliases, you can look at line 27 for instance where they seem to use the aliases qualifier.

jalliot avatar Jun 14 '16 12:06 jalliot

I can't find the most recent MAML schema.

Crypt32 avatar Jun 28 '16 19:06 Crypt32

Me neither... Can't find any working link or reference on Technet/MSDN.

jalliot avatar Jun 29 '16 12:06 jalliot