@specpow/framework 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# CRUD 接口规范
|
|
2
2
|
|
|
3
|
-
## ADDED
|
|
3
|
+
## ADDED
|
|
4
|
+
|
|
5
|
+
### Requirement: 分页查询
|
|
4
6
|
|
|
5
|
-
### API-001: 分页查询
|
|
6
7
|
系统应当提供 `GET /api/{{entity}}` 接口,支持分页查询。
|
|
7
8
|
|
|
8
9
|
**验收标准:**
|
|
@@ -10,7 +11,8 @@
|
|
|
10
11
|
- **When** 用户请求 `GET /api/{{entity}}?page=1&size=10`
|
|
11
12
|
- **Then** 返回分页数据,包含 total、list、page、size
|
|
12
13
|
|
|
13
|
-
###
|
|
14
|
+
### Requirement: 详情查询
|
|
15
|
+
|
|
14
16
|
系统应当提供 `GET /api/{{entity}}/:id` 接口。
|
|
15
17
|
|
|
16
18
|
**验收标准:**
|
|
@@ -18,7 +20,8 @@
|
|
|
18
20
|
- **When** 用户请求 `GET /api/{{entity}}/1`
|
|
19
21
|
- **Then** 返回该记录详情
|
|
20
22
|
|
|
21
|
-
###
|
|
23
|
+
### Requirement: 新增
|
|
24
|
+
|
|
22
25
|
系统应当提供 `POST /api/{{entity}}` 接口。
|
|
23
26
|
|
|
24
27
|
**验收标准:**
|
|
@@ -26,8 +29,10 @@
|
|
|
26
29
|
- **When** 用户请求 `POST /api/{{entity}}`
|
|
27
30
|
- **Then** 创建记录并返回新 ID
|
|
28
31
|
|
|
29
|
-
###
|
|
32
|
+
### Requirement: 修改
|
|
33
|
+
|
|
30
34
|
系统应当提供 `PUT /api/{{entity}}/:id` 接口。
|
|
31
35
|
|
|
32
|
-
###
|
|
36
|
+
### Requirement: 删除
|
|
37
|
+
|
|
33
38
|
系统应当提供 `DELETE /api/{{entity}}/:id` 接口(逻辑删除)。
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# 规范: <能力路径>
|
|
2
2
|
|
|
3
|
-
## ADDED
|
|
3
|
+
## ADDED
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Requirement: <需求标题>
|
|
6
6
|
|
|
7
7
|
**描述**: <系统应该做什么>
|
|
8
8
|
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
## MODIFIED
|
|
19
|
+
## MODIFIED
|
|
20
20
|
|
|
21
|
-
###
|
|
21
|
+
### Requirement: <需求标题>
|
|
22
22
|
|
|
23
23
|
**变更原因**: <为什么修改>
|
|
24
24
|
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
## REMOVED
|
|
30
|
+
## REMOVED
|
|
31
31
|
|
|
32
|
-
###
|
|
32
|
+
### Requirement: <需求标题>
|
|
33
33
|
|
|
34
34
|
**移除原因**: <为什么移除>
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
---
|
|
39
39
|
|
|
40
|
-
## RENAMED
|
|
40
|
+
## RENAMED
|
|
41
41
|
|
|
42
42
|
| 旧名称 | 新名称 | 原因 |
|
|
43
43
|
|--------|--------|------|
|