This is an automated email from the ASF dual-hosted git repository.
lizhimins pushed a commit to branch rocketmq-studio
in repository https://gitbox.apache.org/repos/asf/rocketmq-dashboard.git
The following commit(s) were added to refs/heads/rocketmq-studio by this push:
new 4cbc45120 docs: align the instance section of the API spec with
InstanceType (#4725)
4cbc45120 is described below
commit 4cbc45120617094bb48ddf75e718223052829c05
Author: Apulupie <[email protected]>
AuthorDate: Mon Sep 21 21:11:32 2026 +0800
docs: align the instance section of the API spec with InstanceType (#4725)
`docs/api-spec.md` documented an instance `type` of `PROXY`, both as a list
filter and as a value the server normalizes to `PROXY_CLUSTER`. `InstanceType`
has only `CLOUD`, `PROXY_LOCAL`, `PROXY_CLUSTER` and `DIRECT`,
`InstanceController.listInstances` binds the query parameter straight to the
enum, and no normalization exists anywhere in the server, so a request written
against the document becomes a 400 "Invalid request parameter" in
`GlobalExceptionHandler` before it reaches the se [...]
`PROXY` becomes `CLOUD`, noted as reserved for vendor-managed instances
that `InstanceService` rejects on manual create and update, and the response
field names and types now match `BaseEntity`. `instance.yaml` declares no
instance-type enum, so no catalog regeneration is involved.
Follow-up: the same update-request table lists `id` where
`UpdateInstanceDTO` requires `instanceId`, but that is outside this change's
declared scope and was left as authored. The delete body's `id` row is correct
as it stands.
Fixes #4726
---
docs/api-spec.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/docs/api-spec.md b/docs/api-spec.md
index 14f90f771..cde778ff1 100644
--- a/docs/api-spec.md
+++ b/docs/api-spec.md
@@ -319,22 +319,22 @@ GET /api/instances?type={type}&search={keyword}
| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
-| `type` | `string` | 否 | 按类型过滤: `PROXY`(全部 Proxy)/ `PROXY_LOCAL` /
`PROXY_CLUSTER` / `DIRECT` |
+| `type` | `string` | 否 | 按类型过滤: `CLOUD` / `PROXY_LOCAL` / `PROXY_CLUSTER` /
`DIRECT` |
| `search` | `string` | 否 | 按名称或地址搜索 |
**Response `data`:** `Instance[]`
| 字段 | 类型 | 说明 |
|------|------|------|
-| `id` | `string` | 实例 ID |
+| `id` | `number` | 实例 ID |
| `name` | `string` | 实例名称 |
| `remark` | `string` | 备注 |
-| `type` | `string` | 接入类型: `PROXY`(兼容值)/ `PROXY_LOCAL` / `PROXY_CLUSTER` /
`DIRECT` |
+| `type` | `string` | 接入类型: `CLOUD` / `PROXY_LOCAL` / `PROXY_CLUSTER` /
`DIRECT` |
| `endpoint` | `string` | 接入地址 |
| `topicCount` | `number` | Topic 数量 |
| `consumerGroupCount` | `number` | 消费组数量 |
-| `createdAt` | `string` | 创建时间 |
-| `updatedAt` | `string` | 更新时间 |
+| `gmtCreate` | `string` | 创建时间 |
+| `gmtModified` | `string` | 更新时间 |
### 3.2 创建实例
@@ -347,7 +347,7 @@ POST /api/instances/create
| 字段 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `name` | `string` | 是 | 实例名称 |
-| `type` | `string` | 是 | Apache 实例使用 `PROXY_LOCAL` / `PROXY_CLUSTER` /
`DIRECT`;旧 `PROXY` 请求归一为 `PROXY_CLUSTER` |
+| `type` | `string` | 是 | Apache 实例使用 `PROXY_LOCAL` / `PROXY_CLUSTER` /
`DIRECT`;`CLOUD` 仅用于云厂商代管的实例,手工创建会被拒绝 |
| `endpoint` | `string` | 是 | 接入地址 |
**Response `data`:** `Instance`
@@ -364,7 +364,7 @@ POST /api/instances/update
|------|------|------|------|
| `id` | `string` | 是 | 实例 ID |
| `name` | `string` | 是 | 实例名称 |
-| `type` | `string` | 是 | `PROXY_LOCAL` / `PROXY_CLUSTER` / `DIRECT`;旧 `PROXY`
请求归一为 `PROXY_CLUSTER` |
+| `type` | `string` | 是 | `PROXY_LOCAL` / `PROXY_CLUSTER` / `DIRECT`;`CLOUD`
仅用于云厂商代管的实例 |
| `endpoint` | `string` | 是 | 接入地址 |
**Response `data`:** `Instance`