Azure / Azure/azure-powershell
[Doc]: Add more explanation for cmdlet output section if PassThru shows
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description
Current output section only comes from OutputType attribute in cmdlet implementation. But, platyPS cannot handle the case that cmdlet may return none. It will confuse new user with PowerShell when they read the online doc. It's pretty common when cmdlets support -PassThru.
### Expected behavior
Add a description for output section as below format:
```
### Outputs
None or an object representing the copied item
When you use the PassThru parameter, this cmdlet returns an object that represents the copied item. Otherwise, this cmdlet doesn't generate any output.
```
Copied from: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/copy-item?view=powershell-7.2#outputs
Contributor guide
Research direction
Start by reading platyPS handling of the cmdlet implementation's OutputType attribute and the generated Outputs section, then compare it with the linked Copy-Item documentation example. Done means cmdlets that can return no output unless -PassThru is used document both outcomes and the PassThru behavior in the generated output section.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100