New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature-request] Mandatory parameters on top of list in md files generated by New-MarkdownHelp #346
Comments
Yes, sorting makes sense. Should be easy to add a switch to |
If you look at the source the .md files, they don't distinguish optional and required parameters it is done in a separate process, likely docfx. Docfx does the .md to html conversation and other post processing. |
@iricigor @vors We (Microsoft) are getting rid of the grouping of parameters (mandatory vs. optional). The distinction is not valid. What is mandatory in one parameter set may be optional or non-existent in another parameter set. The syntax blocks are the only way to accurately and concisely document what is mandatory or optional. |
Hi @sdwheeler, thanks for the feedback. I would say that "mandatory in at least one parameter set" is valid distinction, but yes, it is somehow hard for understanding. The same problem with "mandatory parameter and multiple parameter sets" goes all the way back into very Do you have any other ideas how to help admins to distinguish important from less important parameters? Using just syntax blocks can be really hard and emphasizing mandatory parameters would really help. For example, a simple command screenshot 1
I have noticed also that docs.microsoft.com started using colouring for mandatory parameters in syntax blocks. That is nice and helpful, but unfrtunatelly not compatible with markdown or console output. Also, it is not fully persistent, some mandatory parameters are not emphasized. |
@iricigor Interesting. I had not noticed that highlighting behavior before. The highlighting is there because the syntax block is identified as a PowerShell code block in the markdown for |
@sdwheeler yes, thank you for including this guideline! |
In Powershell documentation, Microsoft is grouping parameters in two groups: Required and Optional. See example for command New-Module here. This helps a lot to quickly identify parameters that matter the most.
Can something like this be implemented in New-MarkdownHelp command?
The command is already parsing all parameters, so I think it will be easy to implement. If grouping would be a problem, then at least sorting?
In standard PowerShell, you can identify mandatory parameters with
The text was updated successfully, but these errors were encountered: