Skip to content

Commit 0e5e6a7

Browse files
authored
Merge pull request Azure#3104 from cormacpayne/update-platyps-help
Update documentation for platyPSHelp
2 parents c2b6dc7 + f681ee6 commit 0e5e6a7

File tree

6 files changed

+67
-290
lines changed

6 files changed

+67
-290
lines changed

documentation/platyps-help.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ If your service does not currently have any markdown help, follow the below step
3030

3131
### Installing the `platyPSHelp` Module
3232

33-
The `platyPSHelp` module contains cmdlets that will help service teams with creating, updating, and validating markdown help.
33+
The `platyPSHelp` module contains cmdlets that will help service teams with creating, updating, and validating markdown help for their cmdlets.
3434

3535
There are three cmdlets contained in this module:
3636
- `New-ServiceMarkdownHelp`
@@ -61,15 +61,15 @@ There are four possible parameter sets to choose from when creating your cmdlets
6161
- `FullPath`
6262
- This parameter set will be used if there is an issue when using any of the above parameter sets (*e.g.*, the path to the XML help (MAML) or commands folder does not follow what the cmdlet is expecting); in this case, you can provide the full path to the required items
6363

64-
More information about this cmdlet can be found in the [help]("..\tools\platyPSHelp\help\New-ServiceMarkdownHelp.md").
64+
More information about this cmdlet can be found in the [help](https://github.com/Azure/azure-powershell/blob/dev/tools/platyPSHelp/help/New-ServiceMarkdownHelp.md).
6565

6666
Once ran, this cmdlet will create markdown files for each of the cmdlets in your module, and will be placed in the help folder located on the same level as your XML help (MAML). It will also regenerate the XML help (MAML) to ensure that the information in the markdown help is seen when `Get-Help` or `Get-HelpPreview` is ran.
6767

6868
### Running the `Validate-ServiceMarkdownHelp` cmdlet
6969

7070
Before checking in this markdown, you will need to check to make sure all of the necessary parts are filled out (*i.e.*, synopsis, description, examples, parameter descriptions, and outputs).
7171

72-
This cmdlet contains the same four parameter sets as the `New-ServiceMarkdownHelp`, and more information about the cmdlet can be found in the [help]("..\tools\platyPSHelp\help\Validate-ServiceMarkdownHelp.md").
72+
This cmdlet contains the same four parameter sets as the `New-ServiceMarkdownHelp`, and more information about the cmdlet can be found in the [help](https://github.com/Azure/azure-powershell/blob/dev/tools/platyPSHelp/help/Validate-ServiceMarkdownHelp.md).
7373

7474
Once ran, this cmdlet will output a list of errors for each cmdlet in the following format:
7575

@@ -91,7 +91,7 @@ This will let you know what parts of the markdown help need to be updated. A rec
9191

9292
Anytime that you make changes to a cmdlet (*e.g.*, add/edit/remove parameter, edit output type, etc.), you will need to make sure that those changes are reflected in the markdown. The `Update-ServiceMarkdownHelp` cmdlet will update your markdown with the changes made to your cmdlets.
9393

94-
This cmdlet contains the same four parameter sets as the other two cmdlets, and more information about the cmdlet can be found in the [help]("..\tools\platyPSHelp\help\Update-ServiceMarkdownHelp.md").
94+
This cmdlet contains the same four parameter sets as the other two cmdlets, and more information about the cmdlet can be found in the [help](https://github.com/Azure/azure-powershell/blob/dev/tools/platyPSHelp/help/Update-ServiceMarkdownHelp.md).
9595

9696
In addition to updating the markdown help files, it will also regenerate the XML help (MAML) to ensure that the information in the markdown help is seen when `Get-Help` or `Get-HelpPreview` is ran.
9797

tools/platyPSHelp/help/New-ServiceMarkdownHelp.md

Lines changed: 11 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,22 @@ This cmdlet will create markdown help files for each cmdlet in a given service,
1313

1414
### ServiceManagement
1515
```
16-
New-ServiceMarkdownHelp -Service <String> -BuildTarget <String> -PathToRepo <String> [-ServiceManagement]
17-
[<CommonParameters>]
16+
New-ServiceMarkdownHelp -Service <String> -BuildTarget <String> [-ServiceManagement] [<CommonParameters>]
1817
```
1918

2019
### ResourceManager
2120
```
22-
New-ServiceMarkdownHelp -Service <String> -BuildTarget <String> -PathToRepo <String> [-ResourceManager]
23-
[<CommonParameters>]
21+
New-ServiceMarkdownHelp -Service <String> -BuildTarget <String> [-ResourceManager] [<CommonParameters>]
2422
```
2523

2624
### Storage
2725
```
28-
New-ServiceMarkdownHelp -BuildTarget <String> -PathToRepo <String> [-Storage] [<CommonParameters>]
26+
New-ServiceMarkdownHelp -BuildTarget <String> [-Storage] [<CommonParameters>]
2927
```
3028

3129
### FullPath
3230
```
33-
New-ServiceMarkdownHelp -PathToModule <String> -PathToCommandsFolder <String> -ModuleName <String>
34-
[<CommonParameters>]
31+
New-ServiceMarkdownHelp -PathToModule <String> -PathToCommandsFolder <String> [<CommonParameters>]
3532
```
3633

3734
## DESCRIPTION
@@ -47,28 +44,27 @@ To ensure that the generated markdown help files have all of the necessary field
4744

4845
### -------------------------- Example 1: Creating markdown for an ARM service --------------------------
4946
```
50-
PS C:\> New-ServiceMarkdownHelp -Service Profile -BuildTarget Debug -PathToRepo C:\azure-powershell -ResourceManager
47+
PS C:\> New-ServiceMarkdownHelp -Service Profile -BuildTarget Debug -ResourceManager
5148
```
5249

53-
This example will create markdown help files for all of the Profile cmdlets. It will import the Profile module from C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Profile\AzureRM.Profile.psd1 and create a help folder in C:\azure-powershell\src\ResourceManager\Profile\Commands.Profile.
50+
This example will create markdown help files for all of the Profile cmdlets. It will import the Profile module from PATH_TO_REPO\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Profile\AzureRM.Profile.psd1 and create a help folder in PATH_TO_REPO\src\ResourceManager\Profile\Commands.Profile.
5451

55-
It will also regenerate the existing XML help (MAML) located at C:\azure-powershell\src\ResourceManager\Profile\Commands.Profile\Microsoft.Azure.Commands.Profile.dll-Help.xml.
52+
It will also regenerate the existing XML help (MAML) located at PATH_TO_REPO\src\ResourceManager\Profile\Commands.Profile\Microsoft.Azure.Commands.Profile.dll-Help.xml.
5653

5754
### -------------------------- Example 2: Creating markdown for Storage --------------------------
5855
```
59-
PS C:\> New-ServiceMarkdownHelp -BuildTarget Debug -PathToRepo C:\azure-powershell -Storage
56+
PS C:\> New-ServiceMarkdownHelp -BuildTarget Debug -Storage
6057
```
6158

62-
This example will create markdown help files for all of the Storage cmdlets. It will import the Storage module from C:\azure-powershell\src\Package\Debug\Storage\Azure.Storage\Azure.Storage.psd1 and create a help folder in C:\azure-powershell\src\Storage\Commands.Storage.
59+
This example will create markdown help files for all of the Storage cmdlets. It will import the Storage module from PATH_TO_REPO\src\Package\Debug\Storage\Azure.Storage\Azure.Storage.psd1 and create a help folder in PATH_TO_REPO\src\Storage\Commands.Storage.
6360

64-
It will also regenerate the existing XML help (MAML) located at C:\azure-powershell\src\Storage\Commands.Storage\Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml.
61+
It will also regenerate the existing XML help (MAML) located at PATH_TO_REPO\src\Storage\Commands.Storage\Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml.
6562

6663
### -------------------------- Example 3: Creating markdown with specified paths --------------------------
6764
```
6865
PS C:\> $PathToModule = "C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.TrafficManager\AzureRM.TrafficManager.psd1"
6966
PS C:\> $PathToCommandsFolder = "C:\azure-powershell\src\ResourceManager\TrafficManager\Commands.TrafficManager2"
70-
PS C:\> $ModuleName = "AzureRM.TrafficManager"
71-
PS C:\> New-ServiceMarkdownHelp -PathToModule $PathToModule -PathToCommandsFolder $PathToCommandsFolder -ModuleName $ModuleName
67+
PS C:\> New-ServiceMarkdownHelp -PathToModule $PathToModule -PathToCommandsFolder $PathToCommandsFolder
7268
```
7369

7470
This example will create markdown help files for all of the TrafficManager cmdlets. The reason the ResourceManager parameter set is not used is because the commands folder path does not follow the format that this cmdlet is expecting: rather than ending in Commands.TrafficManager, it ends in Commands.TrafficManager2.
@@ -93,21 +89,6 @@ Accept pipeline input: False
9389
Accept wildcard characters: False
9490
```
9591
96-
### -ModuleName
97-
The name of the service module that will be imported and used to create the markdown help for each cmdlet.
98-
99-
```yaml
100-
Type: String
101-
Parameter Sets: FullPath
102-
Aliases:
103-
104-
Required: True
105-
Position: Named
106-
Default value: None
107-
Accept pipeline input: False
108-
Accept wildcard characters: False
109-
```
110-
11192
### -PathToCommandsFolder
11293
A path to the commands folder for the given service which contains the existing XML help (MAML), and will also contain the help folder with all of the markdown help files.
11394
@@ -138,21 +119,6 @@ Accept pipeline input: False
138119
Accept wildcard characters: False
139120
```
140121
141-
### -PathToRepo
142-
A path to the root of the azure-powershell repository that has been cloned.
143-
144-
```yaml
145-
Type: String
146-
Parameter Sets: ServiceManagement, ResourceManager, Storage
147-
Aliases:
148-
149-
Required: True
150-
Position: Named
151-
Default value: None
152-
Accept pipeline input: False
153-
Accept wildcard characters: False
154-
```
155-
156122
### -ResourceManager
157123
Specifies that the service that help is being created for is ARM.
158124

tools/platyPSHelp/help/Update-ServiceMarkdownHelp.md

Lines changed: 11 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,22 @@ This cmdlet will update markdown help files for each cmdlet in a given service,
1313

1414
### ServiceManagement
1515
```
16-
Update-ServiceMarkdownHelp -Service <String> -BuildTarget <String> -PathToRepo <String> [-ServiceManagement]
17-
[<CommonParameters>]
16+
Update-ServiceMarkdownHelp -Service <String> -BuildTarget <String> [-ServiceManagement] [<CommonParameters>]
1817
```
1918

2019
### ResourceManager
2120
```
22-
Update-ServiceMarkdownHelp -Service <String> -BuildTarget <String> -PathToRepo <String> [-ResourceManager]
23-
[<CommonParameters>]
21+
Update-ServiceMarkdownHelp -Service <String> -BuildTarget <String> [-ResourceManager] [<CommonParameters>]
2422
```
2523

2624
### Storage
2725
```
28-
Update-ServiceMarkdownHelp -BuildTarget <String> -PathToRepo <String> [-Storage] [<CommonParameters>]
26+
Update-ServiceMarkdownHelp -BuildTarget <String> [-Storage] [<CommonParameters>]
2927
```
3028

3129
### FullPath
3230
```
33-
Update-ServiceMarkdownHelp -PathToModule <String> -PathToCommandsFolder <String> -ModuleName <String>
34-
[<CommonParameters>]
31+
Update-ServiceMarkdownHelp -PathToModule <String> -PathToCommandsFolder <String> [<CommonParameters>]
3532
```
3633

3734
## DESCRIPTION
@@ -47,28 +44,27 @@ To ensure that the generated markdown help files have all of the necessary field
4744

4845
### -------------------------- Example 1: Updating markdown for an ARM service --------------------------
4946
```
50-
PS C:\> Update-ServiceMarkdownHelp -Service Profile -BuildTarget Debug -PathToRepo C:\azure-powershell -ResourceManager
47+
PS C:\> Update-ServiceMarkdownHelp -Service Profile -BuildTarget Debug -ResourceManager
5148
```
5249

53-
This example will update markdown help files for all of the Profile cmdlets. It will import the Profile module from C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Profile\AzureRM.Profile.psd1. Then it will update the help files found on the same level as the XML help (MAML).
50+
This example will update markdown help files for all of the Profile cmdlets. It will import the Profile module from PATH_TO_REPO\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Profile\AzureRM.Profile.psd1. Then it will update the help files found on the same level as the XML help (MAML).
5451

55-
It will then regenerate the XML help (MAML) located at C:\azure-powershell\src\ResourceManager\Profile\Commands.Profile\Microsoft.Azure.Commands.Profile.dll-Help.xml.
52+
It will then regenerate the XML help (MAML) located at PATH_TO_REPO\src\ResourceManager\Profile\Commands.Profile\Microsoft.Azure.Commands.Profile.dll-Help.xml.
5653

5754
### -------------------------- Example 2: Updating markdown for Storage --------------------------
5855
```
59-
PS C:\> Update-ServiceMarkdownHelp -BuildTarget Debug -PathToRepo C:\azure-powershell -Storage
56+
PS C:\> Update-ServiceMarkdownHelp -BuildTarget Debug -Storage
6057
```
6158

62-
This example will update markdown help files for all of the Storage cmdlets. It will import the Storage module from C:\azure-powershell\src\Package\Debug\Storage\Azure.Storage\Azure.Storage.psd1 and create a help folder in C:\azure-powershell\src\Storage\Commands.Storage. Then it will update the help files found on the same level as the XML help (MAML).
59+
This example will update markdown help files for all of the Storage cmdlets. It will import the Storage module from PATH_TO_REPO\src\Package\Debug\Storage\Azure.Storage\Azure.Storage.psd1. Then it will update the help files found on the same level as the XML help (MAML).
6360

64-
It will also regenerate the XML help (MAML) located at C:\azure-powershell\src\Storage\Commands.Storage\Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml.
61+
It will also regenerate the XML help (MAML) located at PATH_TO_REPO\src\Storage\Commands.Storage\Microsoft.WindowsAzure.Commands.Storage.dll-Help.xml.
6562

6663
### -------------------------- Example 3: Updating markdown with specified paths --------------------------
6764
```
6865
PS C:\> $PathToModule = "C:\azure-powershell\src\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.TrafficManager\AzureRM.TrafficManager.psd1"
6966
PS C:\> $PathToCommandsFolder = "C:\azure-powershell\src\ResourceManager\TrafficManager\Commands.TrafficManager2"
70-
PS C:\> $ModuleName = "AzureRM.TrafficManager"
71-
PS C:\> Update-ServiceMarkdownHelp -PathToModule $PathToModule -PathToCommandsFolder $PathToCommandsFolder -ModuleName $ModuleName
67+
PS C:\> Update-ServiceMarkdownHelp -PathToModule $PathToModule -PathToCommandsFolder $PathToCommandsFolder
7268
```
7369

7470
This example will update markdown help files for all of the TrafficManager cmdlets. The reason the ResourceManager parameter set is not used is because the commands folder path does not follow the format that this cmdlet is expecting: rather than ending in Commands.TrafficManager, it ends in Commands.TrafficManager2.
@@ -93,21 +89,6 @@ Accept pipeline input: False
9389
Accept wildcard characters: False
9490
```
9591
96-
### -ModuleName
97-
The name of the service module that will be imported and used to update the markdown help for each cmdlet.
98-
99-
```yaml
100-
Type: String
101-
Parameter Sets: FullPath
102-
Aliases:
103-
104-
Required: True
105-
Position: Named
106-
Default value: None
107-
Accept pipeline input: False
108-
Accept wildcard characters: False
109-
```
110-
11192
### -PathToCommandsFolder
11293
A path to the commands folder for the given service which contains the existing XML help (MAML), and will also contain the help folder with all of the markdown help files.
11394
@@ -138,21 +119,6 @@ Accept pipeline input: False
138119
Accept wildcard characters: False
139120
```
140121
141-
### -PathToRepo
142-
A path to the root of the azure-powershell repository that has been cloned.
143-
144-
```yaml
145-
Type: String
146-
Parameter Sets: ServiceManagement, ResourceManager, Storage
147-
Aliases:
148-
149-
Required: True
150-
Position: Named
151-
Default value: None
152-
Accept pipeline input: False
153-
Accept wildcard characters: False
154-
```
155-
156122
### -ResourceManager
157123
Specifies that the service that help is being updated for is ARM.
158124

tools/platyPSHelp/help/Validate-ServiceMarkdownHelp.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ This cmdlet will validate that the markdown help for each cmdlet in a service ha
1313

1414
### ServiceManagement
1515
```
16-
Validate-ServiceMarkdownHelp -Service <String> -PathToRepo <String> [-ServiceManagement] [<CommonParameters>]
16+
Validate-ServiceMarkdownHelp -Service <String> [-ServiceManagement] [<CommonParameters>]
1717
```
1818

1919
### ResourceManager
2020
```
21-
Validate-ServiceMarkdownHelp -Service <String> -PathToRepo <String> [-ResourceManager] [<CommonParameters>]
21+
Validate-ServiceMarkdownHelp -Service <String> [-ResourceManager] [<CommonParameters>]
2222
```
2323

2424
### Storage
2525
```
26-
Validate-ServiceMarkdownHelp -PathToRepo <String> [-Storage] [<CommonParameters>]
26+
Validate-ServiceMarkdownHelp [-Storage] [<CommonParameters>]
2727
```
2828

2929
### FullPath
@@ -58,14 +58,14 @@ If any cmdlet is found to be missing help, Validate-ServiceMarkdownHelp will thr
5858

5959
### -------------------------- Example 1: Validating help for an ARM service --------------------------
6060
```
61-
PS C:\> Validate-ServiceMarkdownHelp -Service Profile -PathToRepo C:\azure-powershell -ResourceManager
61+
PS C:\> Validate-ServiceMarkdownHelp -Service Profile -ResourceManager
6262
```
6363

6464
This example will validate the markdown help for the Profile cmdlets. It will find the help folder containing all of the markdown help and iterate over those files, checking if the necessary sections are filled out to completion.
6565

6666
### -------------------------- Example 2: Validating help for Storage --------------------------
6767
```
68-
PS C:\> Validate-ServiceMarkdownHelp -PathToRepo C:\azure-powershell -Storage
68+
PS C:\> Validate-ServiceMarkdownHelp -Storage
6969
```
7070

7171
This example will validate the markdown help for the Storage cmdlets. It will find the help folder containing all of the markdown help and iterate over those files, checking if the necessary sections are filled out to completion.
@@ -111,21 +111,6 @@ Accept pipeline input: False
111111
Accept wildcard characters: False
112112
```
113113
114-
### -PathToRepo
115-
A path to the root of the azure-powershell repository that has been cloned.
116-
117-
```yaml
118-
Type: String
119-
Parameter Sets: ServiceManagement, ResourceManager, Storage
120-
Aliases:
121-
122-
Required: True
123-
Position: Named
124-
Default value: None
125-
Accept pipeline input: False
126-
Accept wildcard characters: False
127-
```
128-
129114
### -ResourceManager
130115
Specifies that the service that help is being validated for is ARM.
131116

0 commit comments

Comments
 (0)