Audit nested body-field overrides beyond description
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 916
- 派生
- 53
- 平均合并
- 18 小时 37 分钟
- 30 天内合并 PR
- 197
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudflare/cf 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
cloudflare/cf#344 ·
维护者通常 1 天内回复
-
upstream
难度 2/5 1-3 小时 新手友好度 72/100
cloudflare/cf#262 ·
维护者通常 1 天内回复
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` template可能已有人在做 @jamesopstad 于 12 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
cloudflare/cf#223 · 已指派 2 人 ·
维护者通常 1 天内回复
-
upstream
难度 2/5 1-3 小时 新手友好度 75/100
cloudflare/cf#179 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 58/100
cloudflare/cf#406 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
LogicLabs-OU/OpenArchiver#509 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
bigcapitalhq/bigcapital#1545 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复