Commit e1f66bb
`POST /analytics/query` 的响应示例给 `data.fields[]` 三个条目都标了 `label`、
中间那个还标了 `format`,而这个端点的任何一条产出路径都只发 `{ name, type }`。
照文档写的客户端读 `fields[i].label` 渲染表头、读 `format` 格式化金额,拿到的
是 `undefined` —— 不像拼写错误那样当场 400,而是安静地渲染出空表头。
删掉这四个键,并补一段 Callout 说明两层的分工:display name 与 format 是
cube 的 metric/dimension **定义**的属性(`MetricSchema.label` / `.format`),
从 cube 元数据读,不在查询结果里。只删键不解释,下一个读者会重新推导出同样的
错误期待。
Claude-Session: https://claude.ai/code/session_01BDmDsu2575gDxeMCxXhDE3
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 17d0954 commit e1f66bb
1 file changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
375 | | - | |
376 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
383 | 396 | | |
384 | 397 | | |
385 | 398 | | |
| |||
0 commit comments