Import-YamlCommandHelp should error when importing wrong document type
sdwheeler opened this issue · 1 comments
sdwheeler commented
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
Steps to reproduce
Import-YamlCommandHelp v2/yaml/Microsoft.PowerShell.PlatyPS.yml
Import-YamlModuleFile throws error when importing the wrong type.
Expected behavior
Error message similar to:
Import-YamlCommandHelp: Property 'document type' not equal to 'cmdlet'.
Actual behavior
Metadata : {[document type, module], [HelpInfoUri, ], [Locale, en-US], [Module Guid,
0bdcabef-a4b7-4a6d-bf7e-d879817ebbff]…}
Locale : en-US
ModuleGuid :
ExternalHelpFile :
OnlineVersionUrl :
SchemaVersion :
ModuleName : Microsoft.PowerShell.PlatyPS
Title : Microsoft.PowerShell.PlatyPS Module
Synopsis :
Syntax : {}
AliasHeaderFound : False
Aliases : {}
Description : This module contains cmdlets to help with the creation help content for PowerShell
commands.
Examples : {}
Parameters : {}
Inputs : {}
Outputs : {}
Notes :
RelatedLinks : {}
HasCmdletBinding : False
HasWorkflowCommonParameters : False
Diagnostics : Microsoft.PowerShell.PlatyPS.Model.Diagnostics
Error details
No response
Environment data
Microsoft.PowerShell.PlatyPS v2 branch commit
https://github.com/PowerShell/platyPS/commit/27d5ffe4090f146b64c7d91453d6683c68c8ee53
Visuals
No response