Extend PowerShell adapter schema generation with validation attributes and type bounds

Aperta
#1,811 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
json, powershell, rust
Ambito
api, backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
545
Fork
82
Merge medio
4g 16h
PR unite (30g)
21

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PowerShell/DSC

Tutte le issue di PowerShell/DSC

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.