Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect certain frontmatter metadata fields #654

Open
sdwheeler opened this issue Jul 9, 2024 · 2 comments
Open

Protect certain frontmatter metadata fields #654

sdwheeler opened this issue Jul 9, 2024 · 2 comments
Labels
Issue-Enhancement Issue is more of a feature request than a bug
Milestone

Comments

@sdwheeler
Copy link
Collaborator

sdwheeler commented Jul 9, 2024

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 version
  • document 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.
@sdwheeler sdwheeler added the Issue-Enhancement Issue is more of a feature request than a bug label Jul 9, 2024
@sdwheeler sdwheeler added this to the OPS-Release milestone Jul 9, 2024
@sdwheeler
Copy link
Collaborator Author

In 27d5ffe

Tests

  • Export-MarkdownModuleFile - fixed and writes warnings about trying overwrite keys
  • Export-YamlModuleFile - FAIL - keys overwritten
  • Export-MarkdownCommandHelp - keys are not overwritten, but no warning messages about attempt to overwrite
  • Export-YamlCommandHelp - keys are not overwritten, but no warning messages about attempt to overwrite

@sdwheeler
Copy link
Collaborator Author

OPS10 test results

Fixed

  • Export-MarkdownModuleFile - fixed and writes warnings about trying overwrite keys
  • Export-YamlModuleFile - fixed and writes warnings about trying overwrite keys

Need warnings

  • Export-MarkdownCommandHelp - keys are not overwritten, but no warning messages about attempt to overwrite
  • Export-YamlCommandHelp - keys are not overwritten, but no warning messages about attempt to overwrite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement Issue is more of a feature request than a bug
Projects
None yet
Development

No branches or pull requests

1 participant