Skip to content

Extend PowerShell adapter schema generation with validation attributes and type bounds #1811

Open

Description

Summary of the new feature / enhancement

Follow-up to #1775: schemas recognize ValidateSet, explicit nullability, and NotConfigurable, but do not yet express other validation attributes, formats, or numeric storage bounds. Improve metadata-aware validation without rejecting valid PowerShell input/output representations.

Proposed technical implementation details (optional)

Evaluate mappings for ValidateRange, ValidateLength, ValidateCount, and ValidatePattern, plus formats for known string-backed types and min/max bounds for numeric types. Match short, qualified, and Attribute-suffixed names consistently. Account for arrays, nullable types, culture, integer precision, and differences between .NET regex and portable JSON Schema patterns. Keep changes aligned across modern and Windows PowerShell and add boundary/invalid-input cases. Document constraints that cannot be represented faithfully rather than inventing stricter semantics.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions