Extend PowerShell adapter schema generation with validation attributes and type bounds

Đang mở
#1,811 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
22/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
json, powershell, rust
Lĩnh vực
api, backend

Hướng nghiên cứu

The schema generation for the PowerShell adapter follows from #1775, so start by reading the code that already handles ValidateSet, nullability and NotConfigurable and extend it for ValidateRange, ValidateLength, ValidateCount and ValidatePattern. Add boundary and invalid-input cases alongside the existing schema tests. Done means the new mappings are covered by tests and any constraint that cannot be expressed faithfully is documented rather than approximated.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Issue-Enhancement Needs Triage
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.

Ngôn ngữ chính
Rust
Star
545
Fork
82
Merge trung bình
4 ngày 16 giờ
Pull request đã merge (30 ngày)
21

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PowerShell/DSC

Tất cả issue của PowerShell/DSC

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.