From e5cd0db6e326cdfa59ec650ed8ebc865c777b71b Mon Sep 17 00:00:00 2001 From: Gijs Reijn Date: Mon, 11 Nov 2024 13:50:55 +0100 Subject: [PATCH 1/2] Follow pascal casing on -AbbreviateParameterTypename parameter --- src/Command/NewMarkdownHelpCommand.cs | 4 ++-- test/Pester/NewMarkdownHelp.Tests.ps1 | 2 +- .../Microsoft.PowerShell.PlatyPS/New-MarkdownCommandHelp.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Command/NewMarkdownHelpCommand.cs b/src/Command/NewMarkdownHelpCommand.cs index 8e7447ac..e0327438 100644 --- a/src/Command/NewMarkdownHelpCommand.cs +++ b/src/Command/NewMarkdownHelpCommand.cs @@ -61,7 +61,7 @@ public sealed class NewMarkdownHelpCommand : PSCmdlet public SwitchParameter WithModulePage { get; set; } [Parameter] - public SwitchParameter AbbreviateParameterTypename { get; set; } + public SwitchParameter AbbreviateParameterTypeName { get; set; } #endregion @@ -139,7 +139,7 @@ protected override void EndProcessing() ModuleName = cmd.ModuleName is null ? string.Empty : cmd.ModuleName, ModuleGuid = cmd.Module?.Guid is null ? Guid.Empty : cmd.Module.Guid, OnlineVersionUrl = HelpUri, - UseFullTypeName = ! AbbreviateParameterTypename + UseFullTypeName = ! AbbreviateParameterTypeName }; try diff --git a/test/Pester/NewMarkdownHelp.Tests.ps1 b/test/Pester/NewMarkdownHelp.Tests.ps1 index dcb453b1..6883b845 100644 --- a/test/Pester/NewMarkdownHelp.Tests.ps1 +++ b/test/Pester/NewMarkdownHelp.Tests.ps1 @@ -554,7 +554,7 @@ Write-Host 'Hello World!' $expectedParameterNames = "CCC","ddd","WhatIf" $expectedParameterTypes = "String","Nullable``1[System.Int32]","SwitchParameter" $expectedSyntax = 'Get-Alpha [[-CCC] ] [[-ddd] ] [-WhatIf] []' - $file = New-MarkdownCommandHelp -Command (get-command Get-Alpha) -OutputFolder "$TestDrive/alpha" -Force -AbbreviateParameterTypename + $file = New-MarkdownCommandHelp -Command (get-command Get-Alpha) -OutputFolder "$TestDrive/alpha" -Force -AbbreviateParameterTypeName $ch = Import-MarkdownCommandHelp $file $ch.Parameters.Name | Should -Be $expectedParameterNames $ch.Parameters.Type | Should -Be $expectedParameterTypes diff --git a/v2docs/Microsoft.PowerShell.PlatyPS/New-MarkdownCommandHelp.md b/v2docs/Microsoft.PowerShell.PlatyPS/New-MarkdownCommandHelp.md index 410643d3..4187c36e 100644 --- a/v2docs/Microsoft.PowerShell.PlatyPS/New-MarkdownCommandHelp.md +++ b/v2docs/Microsoft.PowerShell.PlatyPS/New-MarkdownCommandHelp.md @@ -24,7 +24,7 @@ Creates Markdown help files for PowerShell modules and commands. New-MarkdownCommandHelp -OutputFolder [-CommandInfo ] [-Encoding ] [-Force] [-HelpUri ] [-HelpInfoUri ] [-HelpVersion ] [-Locale ] [-Metadata ] [-ModuleInfo ] [-WithModulePage] - [-AbbreviateParameterTypename] [-WhatIf] [-Confirm] [] + [-AbbreviateParameterTypeName] [-WhatIf] [-Confirm] [] ``` ## ALIASES @@ -61,7 +61,7 @@ New-MarkdownCommandHelp @newMarkdownCommandHelpSplat ## PARAMETERS -### -AbbreviateParameterTypename +### -AbbreviateParameterTypeName By default, this command uses full type names in the parameter metadata and for the input and output types. When you use this parameter, the cmdlet outputs short type names. From 528459871caebdd7e038e77fb3e1cd0475c28758 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Tue, 22 Jul 2025 15:53:01 -0700 Subject: [PATCH 2/2] Reverted New-MarkdownCommandHelp.md --- .../Microsoft.PowerShell.PlatyPS/New-MarkdownCommandHelp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2docs/Microsoft.PowerShell.PlatyPS/New-MarkdownCommandHelp.md b/v2docs/Microsoft.PowerShell.PlatyPS/New-MarkdownCommandHelp.md index 4187c36e..410643d3 100644 --- a/v2docs/Microsoft.PowerShell.PlatyPS/New-MarkdownCommandHelp.md +++ b/v2docs/Microsoft.PowerShell.PlatyPS/New-MarkdownCommandHelp.md @@ -24,7 +24,7 @@ Creates Markdown help files for PowerShell modules and commands. New-MarkdownCommandHelp -OutputFolder [-CommandInfo ] [-Encoding ] [-Force] [-HelpUri ] [-HelpInfoUri ] [-HelpVersion ] [-Locale ] [-Metadata ] [-ModuleInfo ] [-WithModulePage] - [-AbbreviateParameterTypeName] [-WhatIf] [-Confirm] [] + [-AbbreviateParameterTypename] [-WhatIf] [-Confirm] [] ``` ## ALIASES @@ -61,7 +61,7 @@ New-MarkdownCommandHelp @newMarkdownCommandHelpSplat ## PARAMETERS -### -AbbreviateParameterTypeName +### -AbbreviateParameterTypename By default, this command uses full type names in the parameter metadata and for the input and output types. When you use this parameter, the cmdlet outputs short type names.