Skip to content

Update V2 specs to include more parameter metadata #613

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

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions specs/alias-prototype.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 03/27/2020
ms.date: 12/05/2023
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7.2&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Get-ChildItem
alias:
all: [dir, gci]
windows: [ls]
macos:
linux:
alias: [dir, gci, ls]
---
# Get-ChildItem

Expand Down
28 changes: 23 additions & 5 deletions specs/platyps_2.0_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,24 +110,46 @@ Dynamic: True
Providers: Alias, Function
Values from remaining args: False
Do not show: False
Is credential: False
Is obsolete: False
Release status: Feature Preview
```
~~~

Notes

- Values for most items should be obtained by reflection.
- Provider information will have to be tested individually based on the currently loaded providers.
- The `Default value` should be obtained by reflection, if possible.
- The default value for **SwitchParameter** types should be `False`.
- If possible, the `Parameter sets` and `Providers` values should be simplified to show `(All)` when
the value is the same for all parameter sets or providers.

New metadata

- `Dynamic`
- Type: boolean
- Obtained by reflection of parameter attributes
- Required
- `Providers`
- Type: string containing one or more provider names (comma-separated)
- Optional - expected when `Dynamic` is true
- `Values from remaining args`
- Type: boolean
- Obtained by reflection of parameter attributes
- Required
- `Do not show`
- Type: boolean
- Obtained by reflection of parameter attributes
- Required
- `Is credential`
- Type: boolean
- Obtained by reflection of parameter attributes
- Required
- `Is obsolete`
- Type: boolean
- Obtained by reflection of parameter attributes
- Required
- `Release status`
- Type: string representation of one enum value from:
- 'Preview' - typically not used for parameters
Expand All @@ -150,11 +172,7 @@ is difficult to discover, so don't need `*-MarkdownHelp` cmdlets to create it bu
to support it. The author can add the information to the YAML frontmatter. For example:

```yaml
aliases:
all: [dir, gci]
windows: [ls]
macOS:
linux:
aliases: [dir, gci, ls]
```

Add new H2 for documenting aliases.
Expand Down