fix(base): clarify table-id tbl prefix requirement (#270)

Co-authored-by: kongenpei <kongenpei@users.noreply.github.com>
This commit is contained in:
kongenpei
2026-04-07 20:51:08 +08:00
committed by GitHub
parent f4afa47de8
commit 1be9a241b7
2 changed files with 3 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ func baseTokenFlag(required bool) common.Flag {
}
func tableRefFlag(required bool) common.Flag {
return common.Flag{Name: "table-id", Desc: "table ID or name", Required: required}
return common.Flag{Name: "table-id", Desc: "table ID (must start with tbl if ID) or name", Required: required}
}
func fieldRefFlag(required bool) common.Flag {

View File

@@ -17,7 +17,7 @@ lark-cli base +table-get \
| 参数 | 必填 | 说明 |
|------|------|------|
| `--base-token <token>` | 是 | Base Token |
| `--table-id <id_or_name>` | 是 | 表 ID 或表名 |
| `--table-id <id_or_name>` | 是 | 表 ID`id` 必须以 `tbl` 开头)或表名 |
## API 入参详情
@@ -36,6 +36,7 @@ GET /open-apis/base/v3/bases/:base_token/tables/:table_id
## 坑点
- ⚠️ 如果 `--table-id` 传的是 `id`,必须是 `tbl` 开头;不是的话先询问用户具体是哪张表,或先用 `+table-list` 查表列表再确认。
- ⚠️ `--table-id` 支持传表名,但重名场景下建议优先传 `tbl_xxx`
## 参考