platyPS
platyPS copied to clipboard
Protect certain frontmatter metadata fields
Summary of the new feature / enhancement
There are 2 metadata fields that should not be allowed to be overwritten by values passed to cmdlet using the Metadata parameters:
PlatyPS schema versiondocument type
Proposed technical implementation details (optional)
- The value of those fields should reflect what the output methods are creating
- If the user includes those fields in the hashtable passed to the Metadata parameter, the values ignored and a warning written to tell the user.
In https://github.com/PowerShell/platyPS/commit/27d5ffe4090f146b64c7d91453d6683c68c8ee53
Tests
Export-MarkdownModuleFile- fixed and writes warnings about trying overwrite keysExport-YamlModuleFile- FAIL - keys overwrittenExport-MarkdownCommandHelp- keys are not overwritten, but no warning messages about attempt to overwriteExport-YamlCommandHelp- keys are not overwritten, but no warning messages about attempt to overwrite
OPS10 test results
Fixed
Export-MarkdownModuleFile- fixed and writes warnings about trying overwrite keysExport-YamlModuleFile- fixed and writes warnings about trying overwrite keys
Need warnings
Export-MarkdownCommandHelp- keys are not overwritten, but no warning messages about attempt to overwriteExport-YamlCommandHelp- keys are not overwritten, but no warning messages about attempt to overwrite
Fixed in latest build.