Prerequisites
Steps to reproduce
1: Define a function like this:
function Test-Docs
{
Param
(
[Parameter()]
[string[]]
$Param1
)
}
2: Create markdown help for it: New-MarkdownCommandHelp -CommandInfo (Get-Command Test-Docs) -OutputFolder $HOME
3: Validate that the parameters are found with the diagnostics data:
PS C:\Windows\System32> (Import-MarkdownCommandHelp $HOME\Test-Docs.md).Diagnostics
Diagnostic Output
File: C:\Users\Martin\Test-Docs.md
HadErrors: False
Messages:
Information Metadata found 'external help file'
Information Metadata found 'Locale'
Information Metadata found 'Module Name'
Information Metadata found 'ms.date'
Information Metadata found 'HelpUri'
Information Metadata found 'PlatyPS schema version'
Information Metadata found 'title'
Information General GetCmdletBindingState
Information General GetWorkflowCommonParameterState
Information Synopsis SYNOPSIS found
Information Syntax Test-Docs [[-Param1] <string[]>] [<CommonParameters>]
Information Alias alias header is AST 8
Information Alias alias string length: 0
Information Description DESCRIPTION
Information Example 1 examples found
Information Parameter 1 parameters found
Information Parameter Version 2 metadata found
Information Parameter GetParameters
Information Inputs 0 items found
Information Outputs 1 items found
Information Notes Notes length = 23
Information Links GetRelatedLinks
Information Links 0 links found
4: Edit the file and delete these sections at the end of the file:
## INPUTS
## OUTPUTS
### System.Object
{{ Fill in the Description }}
## NOTES
{{ Fill in the Notes }}
## RELATED LINKS
{{ Fill in the related links here }}
5: Rerun the validation and note how it now found 0 parameters:
PS C:\Windows\System32> (Import-MarkdownCommandHelp $HOME\Test-Docs.md).Diagnostics
Diagnostic Output
File: C:\Users\Martin\Test-Docs.md
HadErrors: True
Messages:
Information Metadata found 'external help file'
Information Metadata found 'Locale'
Information Metadata found 'Module Name'
Information Metadata found 'ms.date'
Information Metadata found 'HelpUri'
Information Metadata found 'PlatyPS schema version'
Information Metadata found 'title'
Information General GetCmdletBindingState
Information General GetWorkflowCommonParameterState
Information Synopsis SYNOPSIS found
Information Syntax Test-Docs [[-Param1] <string[]>] [<CommonParameters>]
Information Alias alias header is AST 8
Information Alias alias string length: 0
Information Description DESCRIPTION
Information Example 1 examples found
Information Parameter 0 parameters found
Error Inputs INPUTS header not found
Error Inputs OUTPUTS header not found
Error Notes GetNotes
Warning Links GetRelatedLinks
Expected behavior
Parameters are found and processed even if there's no section defined below them.
Actual behavior
Parameters are not processed unless the document includes a section below the parameters.
Error details
Environment data
Name Value
---- -----
PSVersion 7.6.0-preview.5
PSEdition Core
GitCommitId 7.6.0-preview.5
OS Microsoft Windows 10.0.26200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
1.0.1
Visuals
No response
Prerequisites
Steps to reproduce
1: Define a function like this:
2: Create markdown help for it:
New-MarkdownCommandHelp -CommandInfo (Get-Command Test-Docs) -OutputFolder $HOME3: Validate that the parameters are found with the diagnostics data:
4: Edit the file and delete these sections at the end of the file:
5: Rerun the validation and note how it now found 0 parameters:
Expected behavior
Parameters are found and processed even if there's no section defined below them.Actual behavior
Parameters are not processed unless the document includes a section below the parameters.Error details
Environment data
Version
1.0.1
Visuals
No response