Skip to content

Add Test-Yaml function to validate YAML content #4

Description

Why

Automation that consumes YAML input often needs to know whether content is valid before acting on it, without wrapping ConvertFrom-Yaml in a try/catch just to check validity.

What

Add a Test-Yaml function that validates whether a given string or file content is well-formed YAML.

Acceptance criteria

  • Test-Yaml returns $true for valid YAML input and $false for invalid input, without throwing
  • Accepts input via pipeline or -InputObject, consistent with ConvertFrom-Yaml

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions