Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Audit nested body-field overrides beyond description

Open
#320 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
cli, tooling

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
853
Forks
42
Avg merge
17h 57m
Merged PRs (30d)
146

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/cf

All issues in cloudflare/cf

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.