Audit nested body-field overrides beyond description
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
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
falseandnullvalues 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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudflare/cf
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cloudflare/cf#344 ·
Maintainers usually reply within 1 day
-
upstream
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cloudflare/cf#262 ·
Maintainers usually reply within 1 day
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templatePossibly taken @jamesopstad claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cloudflare/cf#223 · 2 assignees ·
Maintainers usually reply within 1 day
-
upstream
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cloudflare/cf#179 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
cloudflare/cf#347 ·
Maintainers usually reply within 1 day
Similar issues
-
bug priority: P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
mattermost/compass-design#106 ·
Maintainers usually reply within 1 day
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openclaw/openclaw#176671 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
nordcraftengine/nordcraft#1400 ·
Maintainers usually reply within 1 day