Skip to content

Commit 5b62be7

Browse files
Merge pull request #25 from ilujiez/develop
description field of subcluster is not required
2 parents 446839e + 0a0d2e1 commit 5b62be7

2 files changed

Lines changed: 15 additions & 8 deletions

File tree

docs/zh_cn/open_api/product/subclusters.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
}
4646
```
4747

48-
- ready: 子集群是否就绪,可以被添加到集群中,准备接入流量。
48+
- ready: 表示子集群是否就绪。只有已就绪的子集群可以被挂载到集群,准备接入流量。
4949
- cluster_name: 在集群配置时,会选择子集群进行挂载
5050
- 如果当前子集群被挂载到某个集群上,那么cluster_name就是对应的集群名字
5151
- 如果当前子集群未挂载到某个集群上,那么cluster_name就是空串
@@ -96,7 +96,13 @@
9696
#### 成功返回数据示例
9797
```
9898
[
99-
单条同详情的成功返回数据示例
99+
{
100+
"name": "subcluster_demo",
101+
"instance_pool": "pool_demo",
102+
"ready": true,
103+
"description": "description message",
104+
"cluster_name":"cluster_demo"
105+
}
100106
]
101107
```
102108

@@ -116,19 +122,20 @@
116122
| product_name | string | 产品线名字 | Y | |
117123
| sub_cluster_name | string | 子集群名字 | Y | - |
118124

119-
HTTP BODY中参数示例
125+
#### Body 参数
126+
| 参数名 | 类型 |参数含义 | 必填 | 补充描述 |
127+
| - | - | - | - | - |
128+
| name | string | 子集群名字 | N | 一个产品线内子集群名字唯一 |
129+
| description | string | 子集群描述信息 | N | - |
120130

131+
#### 输入参数示例
121132
```
122133
{
123134
"name": "subcluster_demo",
124135
"description": "description message"
125136
}
126137
```
127138

128-
- 可以变更的字段:
129-
- description
130-
- name不可变更
131-
132139
### 返回数据(Data内容)
133140
同创建接口
134141

endpoints/openapi_v1/subcluster/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
type CreateParam struct {
3030
Name *string `json:"name" uri:"name" validate:"required,min=2"`
3131
InstancePool *string `json:"instance_pool" uri:"instance_pool" validate:"required,min=2"`
32-
Description *string `json:"description" uri:"description" validate:"required,min=2"`
32+
Description *string `json:"description" uri:"description" validate:"omitempty,min=2"`
3333
}
3434

3535
// CreateRoute route

0 commit comments

Comments
 (0)