platyPS icon indicating copy to clipboard operation
platyPS copied to clipboard

HelpMessage of binary cmdlet

Open apobekiaris opened this issue 6 years ago • 2 comments

Steps to reproduce

in a c# cmdlet i define

[Parameter(HelpMessage = "aaaaaaaaaaaaaaaaaaa")]
public int ActivityId{ get; set; }

Expected behavior

I expect the module to understand my initial message "aaaaaaaaa"

Actual behavior

it render the usual

{{ Fill ActivityId Description }}

Environment data

I used a recompiled version of master

Name Value


PSVersion 5.1.17763.316 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17763.316 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

apobekiaris avatar May 17 '19 15:05 apobekiaris

This is not only for parameter description but for all help information in binary modules. I implemented it following this instruction (https://www.red-gate.com/simple-talk/dotnet/software-tools/documenting-your-powershell-binary-cmdlets/#third).

abbgrade avatar Nov 15 '20 08:11 abbgrade

PlatyPS was not designed to use the help message attribute. The attribute is to prompt the user, which is not necessarily proper documentation for the parameter. But, I could argue that we may want to include this, so I'll mark for future consideration.

theJasonHelmick avatar Jul 27 '21 15:07 theJasonHelmick

The HelpMessage for a parameter is now included in the parameter metadate in Microsoft.PowerShell.PlatyPS v1.

sdwheeler avatar May 31 '24 15:05 sdwheeler