Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Audit nested body-field overrides beyond description

Aperta
#320 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
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli, tooling

Direzione di ricerca

Start with the o override lookup in bodyParams() in packages/cli/generator/plugin/args.ts, where an exact dotted-path override is checked before falling back to the first path segment. Decide the intended scope for choices, array, required, fromFile and default on flattened fields, then add regression tests for parent overrides, exact child overrides and siblings without overrides. Done means the generator is fixed, the affected commands are regenerated, and the tests pass.

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

Descrizione

Follow-up to the review comment on #315. This is a non-blocking follow-up to the JSON map flags work.

#315 makes body-field description overrides use the exact API field path, so a parent object's description is not reused for its flattened child flags. The other override properties still use the shared o lookup in bodyParams() in packages/cli/generator/plugin/args.ts: it selects an exact dotted-path override when present, otherwise falls back to the first path segment.

For a field such as settings.enabled, that fallback can apply an override intended for settings to --settings-enabled. The properties to audit are choices, array, required, fromFile, and default. These affect argument types, validation, file parsing, and generated request values, beyond the help text addressed in #315.

Expected behaviour
  • Define and apply the intended scope of each override property for flattened body fields. Field-specific overrides should target the exact API field path; any intentional parent/group behaviour should be handled explicitly.
  • Preserve top-level overrides and the existing rules for optional parent objects and nested defaults.
  • Add regression tests for parent overrides, exact child overrides, and siblings without overrides, including explicit false and null values where supported. Verify emitted command behaviour and metadata remain consistent.

Implement this in the generator and regenerate affected output rather than editing generated commands directly.

Lingua principale
TypeScript
Stelle
853
Fork
42
Merge medio
17h 57m
PR unite (30g)
146

Preparare l'ambiente

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 cloudflare/cf

Tutte le issue di cloudflare/cf

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.