zentao-api 0.1.0 → 0.2.0-beta.2

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.
Files changed (53) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +221 -131
  3. package/dist/browser/zentao-api.global.js +2 -0
  4. package/dist/browser.d.ts +1 -0
  5. package/dist/browser.js +1 -0
  6. package/dist/client/index.d.ts +39 -0
  7. package/dist/client/index.js +172 -0
  8. package/dist/index.d.ts +8 -4
  9. package/dist/index.js +7 -8
  10. package/dist/misc/browser-global.d.ts +1 -0
  11. package/dist/misc/browser-global.js +8 -0
  12. package/dist/misc/environment.d.ts +8 -0
  13. package/dist/misc/environment.js +124 -0
  14. package/dist/misc/errors.d.ts +30 -0
  15. package/dist/misc/errors.js +40 -0
  16. package/dist/misc/global-options.d.ts +5 -0
  17. package/dist/misc/global-options.js +9 -0
  18. package/dist/modules/generated.d.ts +8 -0
  19. package/dist/modules/generated.js +4226 -0
  20. package/dist/modules/registry.d.ts +22 -0
  21. package/dist/modules/registry.js +142 -0
  22. package/dist/modules/resolve.d.ts +7 -0
  23. package/dist/modules/resolve.js +206 -0
  24. package/dist/profiles/index.d.ts +14 -0
  25. package/dist/profiles/index.js +205 -0
  26. package/dist/request/index.d.ts +7 -0
  27. package/dist/request/index.js +65 -0
  28. package/dist/types/index.d.ts +296 -0
  29. package/dist/types/index.js +1 -0
  30. package/dist/utils/index.d.ts +6 -0
  31. package/dist/utils/index.js +26 -0
  32. package/dist/version.d.ts +2 -0
  33. package/dist/version.js +4 -0
  34. package/package.json +52 -76
  35. package/dist/types.d.ts +0 -70
  36. package/dist/utils.d.ts +0 -93
  37. package/dist/zentao-api.cjs.development.js +0 -3619
  38. package/dist/zentao-api.cjs.development.js.map +0 -1
  39. package/dist/zentao-api.cjs.production.min.js +0 -2
  40. package/dist/zentao-api.cjs.production.min.js.map +0 -1
  41. package/dist/zentao-api.esm.js +0 -3611
  42. package/dist/zentao-api.esm.js.map +0 -1
  43. package/dist/zentao-config.d.ts +0 -93
  44. package/dist/zentao-request-builder.d.ts +0 -120
  45. package/dist/zentao.d.ts +0 -175
  46. package/dist/zentao12.d.ts +0 -676
  47. package/src/index.ts +0 -5
  48. package/src/types.ts +0 -88
  49. package/src/utils.ts +0 -216
  50. package/src/zentao-config.ts +0 -150
  51. package/src/zentao-request-builder.ts +0 -227
  52. package/src/zentao.ts +0 -596
  53. package/src/zentao12.ts +0 -1272
@@ -0,0 +1,4226 @@
1
+ /**
2
+ * 内置模块注册表:key 为模块名(小写),value 为对应禅道 REST 资源元数据。
3
+ * 新增模块时优先更新 OpenAPI 数据并重新生成此文件。
4
+ *
5
+ * 此文件由 scripts/update-registry.ts 自动生成,请勿手动编辑。
6
+ */
7
+ export const BUILTIN_MODULES = [
8
+ /* 用户模块 */
9
+ {
10
+ name: 'user',
11
+ display: '用户',
12
+ description: '用户管理,支持获取用户列表、创建用户、获取用户详情、修改用户信息、删除用户',
13
+ actions: [
14
+ {
15
+ name: 'list',
16
+ display: '获取用户列表',
17
+ type: 'list',
18
+ method: 'get',
19
+ path: '/users',
20
+ resultType: 'list',
21
+ pagerGetter: 'pager',
22
+ resultGetter: 'users',
23
+ params: [
24
+ {
25
+ name: 'browseType',
26
+ required: false,
27
+ type: 'string',
28
+ description: '浏览类型',
29
+ options: [
30
+ { value: 'inside', label: '内部用户' },
31
+ { value: 'outside', label: '内部用户' },
32
+ ],
33
+ },
34
+ {
35
+ name: 'orderBy',
36
+ required: false,
37
+ type: 'string',
38
+ description: '排序',
39
+ options: [
40
+ { value: 'id_asc', label: 'ID 升序' },
41
+ { value: 'id_desc', label: 'ID 降序' },
42
+ { value: 'realname_asc', label: '姓名 升序' },
43
+ { value: 'realname_desc', label: '姓名 降序' },
44
+ { value: 'account_asc', label: '用户名 升序' },
45
+ { value: 'account_desc', label: '用户名 降序' },
46
+ ],
47
+ },
48
+ {
49
+ name: 'recPerPage',
50
+ required: false,
51
+ type: 'number',
52
+ description: '每页数量,不超过1000',
53
+ },
54
+ {
55
+ name: 'pageID',
56
+ required: false,
57
+ type: 'number',
58
+ description: '页码,从第1页开始',
59
+ },
60
+ ],
61
+ }, {
62
+ name: 'create',
63
+ display: '创建用户',
64
+ type: 'create',
65
+ method: 'post',
66
+ path: '/users',
67
+ resultType: 'object',
68
+ requestBody: {
69
+ required: true,
70
+ type: 'object',
71
+ schema: {
72
+ "type": "object",
73
+ "properties": {
74
+ "account": {
75
+ "type": "string",
76
+ "description": "登录名"
77
+ },
78
+ "realname": {
79
+ "type": "string",
80
+ "description": "姓名"
81
+ },
82
+ "password": {
83
+ "type": "string",
84
+ "description": "密码"
85
+ }
86
+ },
87
+ "required": [
88
+ "account",
89
+ "realname",
90
+ "password"
91
+ ]
92
+ },
93
+ },
94
+ }, {
95
+ name: 'get',
96
+ display: '获取用户详情',
97
+ type: 'get',
98
+ method: 'get',
99
+ path: '/users/{userID}',
100
+ resultType: 'object',
101
+ resultGetter: 'user',
102
+ pathParams: {
103
+ userID: '用户ID',
104
+ },
105
+ }, {
106
+ name: 'update',
107
+ display: '修改用户信息',
108
+ type: 'update',
109
+ method: 'put',
110
+ path: '/users/{userID}',
111
+ resultType: 'object',
112
+ pathParams: {
113
+ userID: '用户ID',
114
+ },
115
+ requestBody: {
116
+ required: true,
117
+ type: 'object',
118
+ schema: {
119
+ "type": "object",
120
+ "properties": {
121
+ "realname": {
122
+ "type": "string",
123
+ "description": "真实姓名"
124
+ },
125
+ "dept": {
126
+ "type": "integer",
127
+ "description": "部门",
128
+ "format": "int32"
129
+ },
130
+ "join": {
131
+ "type": "string",
132
+ "description": "入职日期"
133
+ },
134
+ "group": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "string"
138
+ },
139
+ "description": "权限分组"
140
+ },
141
+ "email": {
142
+ "type": "string",
143
+ "description": "邮箱"
144
+ },
145
+ "visions": {
146
+ "type": "array",
147
+ "items": {
148
+ "type": "string"
149
+ },
150
+ "description": "界面类型(研发综合界面 rnd | 运营管理界面 lite)"
151
+ },
152
+ "mobile": {
153
+ "type": "string",
154
+ "description": "手机"
155
+ },
156
+ "weixin": {
157
+ "type": "string",
158
+ "description": "微信"
159
+ },
160
+ "password": {
161
+ "type": "string",
162
+ "description": "密码"
163
+ }
164
+ }
165
+ },
166
+ },
167
+ }, {
168
+ name: 'delete',
169
+ display: '删除用户',
170
+ type: 'delete',
171
+ method: 'delete',
172
+ path: '/users/{userID}',
173
+ resultType: 'text',
174
+ pathParams: {
175
+ userID: '用户ID',
176
+ },
177
+ render: 'action',
178
+ }
179
+ ],
180
+ },
181
+ /* 项目集模块 */
182
+ {
183
+ name: 'program',
184
+ display: '项目集',
185
+ description: '项目集管理,支持获取项目集列表、创建项目集、获取项目集详情、修改项目集、删除项目集',
186
+ actions: [
187
+ {
188
+ name: 'list',
189
+ display: '获取项目集列表',
190
+ type: 'list',
191
+ method: 'get',
192
+ path: '/programs',
193
+ resultType: 'list',
194
+ pagerGetter: 'pager',
195
+ resultGetter: 'programs',
196
+ params: [
197
+ {
198
+ name: 'status',
199
+ required: false,
200
+ type: 'string',
201
+ description: '状态',
202
+ options: [
203
+ { value: 'all', label: '全部' },
204
+ { value: 'unclosed', label: '未关闭' },
205
+ { value: 'wait', label: '未开始' },
206
+ { value: 'doing', label: '进行中' },
207
+ { value: 'suspended', label: '已挂起' },
208
+ { value: 'delayed', label: '已延期' },
209
+ { value: 'closed', label: '已关闭' },
210
+ ],
211
+ },
212
+ {
213
+ name: 'orderBy',
214
+ required: false,
215
+ type: 'string',
216
+ description: '排序',
217
+ options: [
218
+ { value: 'id_asc', label: 'ID 升序' },
219
+ { value: 'id_desc', label: 'ID 降序' },
220
+ { value: 'name_asc', label: '名称 升序' },
221
+ { value: 'name_desc', label: '名称 降序' },
222
+ { value: 'begin_asc', label: '计划开始 升序' },
223
+ { value: 'begin_desc', label: '计划开始 降序' },
224
+ { value: 'end_asc', label: '计划结束 升序' },
225
+ { value: 'end_desc', label: '计划结束 降序' },
226
+ ],
227
+ },
228
+ {
229
+ name: 'recPerPage',
230
+ required: false,
231
+ type: 'number',
232
+ description: '每页数量,不超过1000',
233
+ },
234
+ {
235
+ name: 'pageID',
236
+ required: false,
237
+ type: 'number',
238
+ description: '页码,从第1页开始',
239
+ },
240
+ ],
241
+ }, {
242
+ name: 'create',
243
+ display: '创建项目集',
244
+ type: 'create',
245
+ method: 'post',
246
+ path: '/programs',
247
+ resultType: 'object',
248
+ requestBody: {
249
+ required: true,
250
+ type: 'object',
251
+ schema: {
252
+ "type": "object",
253
+ "properties": {
254
+ "name": {
255
+ "type": "string",
256
+ "description": "项目集名称"
257
+ },
258
+ "begin": {
259
+ "type": "string",
260
+ "description": "计划开始日期"
261
+ },
262
+ "end": {
263
+ "type": "string",
264
+ "description": "计划完成日期"
265
+ },
266
+ "PM": {
267
+ "type": "string",
268
+ "description": "计划完成日期"
269
+ },
270
+ "desc": {
271
+ "type": "string",
272
+ "description": "项目集描述"
273
+ }
274
+ },
275
+ "required": [
276
+ "name",
277
+ "begin",
278
+ "end"
279
+ ]
280
+ },
281
+ },
282
+ }, {
283
+ name: 'get',
284
+ display: '获取项目集详情',
285
+ type: 'get',
286
+ method: 'get',
287
+ path: '/programs/{programID}',
288
+ resultType: 'object',
289
+ resultGetter: 'program',
290
+ pathParams: {
291
+ programID: '项目集ID',
292
+ },
293
+ }, {
294
+ name: 'update',
295
+ display: '修改项目集',
296
+ type: 'update',
297
+ method: 'put',
298
+ path: '/programs/{programID}',
299
+ resultType: 'object',
300
+ pathParams: {
301
+ programID: '项目集ID',
302
+ },
303
+ requestBody: {
304
+ required: true,
305
+ type: 'object',
306
+ schema: {
307
+ "type": "object",
308
+ "properties": {
309
+ "name": {
310
+ "type": "string",
311
+ "description": "项目集名称"
312
+ },
313
+ "begin": {
314
+ "type": "string",
315
+ "description": "计划开始日期"
316
+ },
317
+ "end": {
318
+ "type": "string",
319
+ "description": "计划完成日期"
320
+ },
321
+ "PM": {
322
+ "type": "string",
323
+ "description": "计划完成日期"
324
+ },
325
+ "desc": {
326
+ "type": "string",
327
+ "description": "项目集描述"
328
+ }
329
+ },
330
+ "required": [
331
+ "name",
332
+ "begin",
333
+ "end"
334
+ ]
335
+ },
336
+ },
337
+ }, {
338
+ name: 'delete',
339
+ display: '删除项目集',
340
+ type: 'delete',
341
+ method: 'delete',
342
+ path: '/programs/{programID}',
343
+ resultType: 'text',
344
+ pathParams: {
345
+ programID: '项目集ID',
346
+ },
347
+ render: 'action',
348
+ }
349
+ ],
350
+ },
351
+ /* 产品模块 */
352
+ {
353
+ name: 'product',
354
+ display: '产品',
355
+ description: '产品管理,支持获取产品列表、创建产品、获取产品详情、修改产品、删除产品',
356
+ actions: [
357
+ {
358
+ name: 'list',
359
+ display: '获取产品列表',
360
+ type: 'list',
361
+ method: 'get',
362
+ path: '/products',
363
+ resultType: 'list',
364
+ pagerGetter: 'pager',
365
+ resultGetter: 'products',
366
+ params: [
367
+ {
368
+ name: 'browseType',
369
+ required: false,
370
+ type: 'string',
371
+ description: '浏览类型',
372
+ options: [
373
+ { value: 'all', label: '全部' },
374
+ { value: 'noclosed', label: '未关闭' },
375
+ { value: 'closed', label: '已结束' },
376
+ ],
377
+ },
378
+ {
379
+ name: 'orderBy',
380
+ required: false,
381
+ type: 'string',
382
+ description: '排序',
383
+ options: [
384
+ { value: 'id_asc', label: 'ID 升序' },
385
+ { value: 'id_desc', label: 'ID 降序' },
386
+ { value: 'title_asc', label: '名称 升序' },
387
+ { value: 'title_desc', label: '名称 降序' },
388
+ { value: 'begin_asc', label: '计划开始 升序' },
389
+ { value: 'begin_desc', label: '计划开始 降序' },
390
+ { value: 'end_asc', label: '计划结束 升序' },
391
+ { value: 'end_desc', label: '计划结束 降序' },
392
+ ],
393
+ },
394
+ {
395
+ name: 'recPerPage',
396
+ required: false,
397
+ type: 'number',
398
+ description: '每页数量,不超过1000',
399
+ },
400
+ {
401
+ name: 'pageID',
402
+ required: false,
403
+ type: 'number',
404
+ description: '页码,从第1页开始',
405
+ },
406
+ ],
407
+ }, {
408
+ name: 'create',
409
+ display: '创建产品',
410
+ type: 'create',
411
+ method: 'post',
412
+ path: '/products',
413
+ resultType: 'object',
414
+ requestBody: {
415
+ required: true,
416
+ type: 'object',
417
+ schema: {
418
+ "type": "object",
419
+ "properties": {
420
+ "name": {
421
+ "type": "string",
422
+ "description": "产品名称"
423
+ },
424
+ "program": {
425
+ "type": "integer",
426
+ "description": "所属项目集",
427
+ "format": "int32"
428
+ },
429
+ "line": {
430
+ "type": "integer",
431
+ "description": "所属产品线",
432
+ "format": "int32"
433
+ },
434
+ "type": {
435
+ "type": "string",
436
+ "description": "类型(normal 正常 | branch 多分支 | platform 多平台)"
437
+ },
438
+ "PO": {
439
+ "type": "string",
440
+ "description": "产品负责人"
441
+ },
442
+ "reviewer": {
443
+ "type": "array",
444
+ "items": {
445
+ "type": "string"
446
+ },
447
+ "description": "评审人"
448
+ },
449
+ "desc": {
450
+ "type": "array",
451
+ "items": {
452
+ "type": "string"
453
+ },
454
+ "description": "产品描述"
455
+ },
456
+ "QD": {
457
+ "type": "string",
458
+ "description": "测试负责人"
459
+ },
460
+ "RD": {
461
+ "type": "string",
462
+ "description": "发布负责人"
463
+ },
464
+ "acl": {
465
+ "type": "string",
466
+ "description": "访问控制(open 公开 | private 私有)"
467
+ }
468
+ },
469
+ "required": [
470
+ "name"
471
+ ]
472
+ },
473
+ },
474
+ }, {
475
+ name: 'get',
476
+ display: '获取产品详情',
477
+ type: 'get',
478
+ method: 'get',
479
+ path: '/products/{productID}',
480
+ resultType: 'object',
481
+ resultGetter: 'product',
482
+ pathParams: {
483
+ productID: '产品ID',
484
+ },
485
+ }, {
486
+ name: 'update',
487
+ display: '修改产品',
488
+ type: 'update',
489
+ method: 'put',
490
+ path: '/products/{productID}',
491
+ resultType: 'object',
492
+ pathParams: {
493
+ productID: '产品ID',
494
+ },
495
+ requestBody: {
496
+ required: true,
497
+ type: 'object',
498
+ schema: {
499
+ "type": "object",
500
+ "properties": {
501
+ "name": {
502
+ "type": "string",
503
+ "description": "产品名称"
504
+ },
505
+ "program": {
506
+ "type": "integer",
507
+ "description": "所属项目集",
508
+ "format": "int32"
509
+ },
510
+ "line": {
511
+ "type": "integer",
512
+ "description": "所属产品线",
513
+ "format": "int32"
514
+ },
515
+ "type": {
516
+ "type": "string",
517
+ "description": "类型(normal 正常 | branch 多分支 | platform 多平台)"
518
+ },
519
+ "PO": {
520
+ "type": "string",
521
+ "description": "产品负责人"
522
+ },
523
+ "reviewer": {
524
+ "type": "array",
525
+ "items": {
526
+ "type": "string"
527
+ },
528
+ "description": "评审人"
529
+ },
530
+ "desc": {
531
+ "type": "array",
532
+ "items": {
533
+ "type": "string"
534
+ },
535
+ "description": "产品描述"
536
+ },
537
+ "QD": {
538
+ "type": "string",
539
+ "description": "测试负责人"
540
+ },
541
+ "RD": {
542
+ "type": "string",
543
+ "description": "发布负责人"
544
+ },
545
+ "acl": {
546
+ "type": "string",
547
+ "description": "访问控制(open 公开 | private 私有)"
548
+ }
549
+ },
550
+ "required": [
551
+ "name"
552
+ ]
553
+ },
554
+ },
555
+ }, {
556
+ name: 'delete',
557
+ display: '删除产品',
558
+ type: 'delete',
559
+ method: 'delete',
560
+ path: '/products/{productID}',
561
+ resultType: 'text',
562
+ pathParams: {
563
+ productID: '产品ID',
564
+ },
565
+ render: 'action',
566
+ }
567
+ ],
568
+ },
569
+ /* 项目模块 */
570
+ {
571
+ name: 'project',
572
+ display: '项目',
573
+ description: '项目管理,支持获取项目列表、创建项目、修改项目、删除项目',
574
+ actions: [
575
+ {
576
+ name: 'list',
577
+ display: '获取项目列表',
578
+ type: 'list',
579
+ method: 'get',
580
+ path: '/projects',
581
+ resultType: 'list',
582
+ pagerGetter: 'pager',
583
+ resultGetter: 'projects',
584
+ params: [
585
+ {
586
+ name: 'browseType',
587
+ required: false,
588
+ type: 'string',
589
+ description: '项目状态,默认是undone',
590
+ defaultValue: 'undone',
591
+ options: [
592
+ { value: 'all', label: '全部' },
593
+ { value: 'undone', label: '未完成' },
594
+ { value: 'wait', label: '未开始' },
595
+ { value: 'doing', label: '进行中' },
596
+ ],
597
+ },
598
+ {
599
+ name: 'orderBy',
600
+ required: false,
601
+ type: 'string',
602
+ description: '排序',
603
+ options: [
604
+ { value: 'id_asc', label: 'ID 升序' },
605
+ { value: 'id_desc', label: 'ID 降序' },
606
+ { value: 'name_asc', label: '名称 升序' },
607
+ { value: 'name_desc', label: '名称 降序' },
608
+ { value: 'begin_asc', label: '计划开始 升序' },
609
+ { value: 'begin_desc', label: '计划开始 降序' },
610
+ { value: 'end_asc', label: '计划结束 升序' },
611
+ { value: 'end_desc', label: '计划结束 降序' },
612
+ ],
613
+ },
614
+ {
615
+ name: 'recPerPage',
616
+ required: false,
617
+ type: 'number',
618
+ description: '每页数量,不超过1000',
619
+ },
620
+ {
621
+ name: 'pageID',
622
+ required: false,
623
+ type: 'number',
624
+ description: '页码,从第1页开始',
625
+ },
626
+ ],
627
+ }, {
628
+ name: 'create',
629
+ display: '创建项目',
630
+ type: 'create',
631
+ method: 'post',
632
+ path: '/projects',
633
+ resultType: 'object',
634
+ requestBody: {
635
+ required: true,
636
+ type: 'object',
637
+ schema: {
638
+ "type": "object",
639
+ "properties": {
640
+ "name": {
641
+ "type": "string",
642
+ "description": "项目名称"
643
+ },
644
+ "model": {
645
+ "type": "string",
646
+ "description": "项目管理方式(scrum 敏捷 | waterfall 瀑布 | kanban 看板 | agileplus 融合敏捷 | waterfallplus 融合瀑布)"
647
+ },
648
+ "begin": {
649
+ "type": "string",
650
+ "description": "开始日期"
651
+ },
652
+ "end": {
653
+ "type": "string",
654
+ "description": "结束日期"
655
+ },
656
+ "products": {
657
+ "type": "array",
658
+ "items": {
659
+ "type": "string"
660
+ },
661
+ "description": "关联产品"
662
+ },
663
+ "parent": {
664
+ "type": "integer",
665
+ "description": "所属项目集",
666
+ "format": "int32"
667
+ },
668
+ "workflowGroup": {
669
+ "type": "integer",
670
+ "description": "项目流程,付费版功能,开源版可以不填",
671
+ "format": "int32"
672
+ },
673
+ "PM": {
674
+ "type": "string",
675
+ "description": "项目负责人"
676
+ }
677
+ },
678
+ "required": [
679
+ "name",
680
+ "model",
681
+ "begin",
682
+ "end",
683
+ "workflowGroup"
684
+ ]
685
+ },
686
+ },
687
+ }, {
688
+ name: 'update',
689
+ display: '修改项目',
690
+ type: 'update',
691
+ method: 'put',
692
+ path: '/projects/{projectID}',
693
+ resultType: 'object',
694
+ pathParams: {
695
+ projectID: '项目ID',
696
+ },
697
+ requestBody: {
698
+ required: true,
699
+ type: 'object',
700
+ schema: {
701
+ "type": "object",
702
+ "properties": {
703
+ "name": {
704
+ "type": "string",
705
+ "description": "项目名称"
706
+ },
707
+ "model": {
708
+ "type": "string",
709
+ "description": "项目管理方式(scrum 敏捷 | waterfall 瀑布 | kanban 看板 | agileplus 融合敏捷 | waterfallplus 融合瀑布)"
710
+ },
711
+ "begin": {
712
+ "type": "string",
713
+ "description": "开始日期"
714
+ },
715
+ "end": {
716
+ "type": "string",
717
+ "description": "结束日期"
718
+ },
719
+ "products": {
720
+ "type": "array",
721
+ "items": {
722
+ "type": "string"
723
+ },
724
+ "description": "关联产品"
725
+ },
726
+ "parent": {
727
+ "type": "integer",
728
+ "description": "所属项目集",
729
+ "format": "int32"
730
+ },
731
+ "workflowGroup": {
732
+ "type": "integer",
733
+ "description": "项目流程,付费版功能,开源版可以不填",
734
+ "format": "int32"
735
+ },
736
+ "PM": {
737
+ "type": "string",
738
+ "description": "项目负责人"
739
+ }
740
+ },
741
+ "required": [
742
+ "name",
743
+ "model",
744
+ "begin",
745
+ "end",
746
+ "workflowGroup"
747
+ ]
748
+ },
749
+ },
750
+ }, {
751
+ name: 'delete',
752
+ display: '删除项目',
753
+ type: 'delete',
754
+ method: 'delete',
755
+ path: '/projects/{projectID}',
756
+ resultType: 'text',
757
+ pathParams: {
758
+ projectID: '项目ID',
759
+ },
760
+ render: 'action',
761
+ }
762
+ ],
763
+ },
764
+ /* 执行模块 */
765
+ {
766
+ name: 'execution',
767
+ display: '执行',
768
+ description: '执行管理,支持获取执行列表、创建执行、获取执行详情、修改执行、删除执行',
769
+ actions: [
770
+ {
771
+ name: 'list',
772
+ display: '获取执行列表',
773
+ type: 'list',
774
+ method: 'get',
775
+ path: '/executions',
776
+ resultType: 'list',
777
+ pagerGetter: 'pager',
778
+ resultGetter: 'executions',
779
+ params: [
780
+ {
781
+ name: 'status',
782
+ required: false,
783
+ type: 'string',
784
+ description: '执行状态,默认是undone',
785
+ defaultValue: 'undone',
786
+ options: [
787
+ { value: 'all', label: '全部' },
788
+ { value: 'undone', label: '未完成' },
789
+ { value: 'wait', label: '未开始' },
790
+ { value: 'doing', label: '进行中' },
791
+ ],
792
+ },
793
+ {
794
+ name: 'orderBy',
795
+ required: false,
796
+ type: 'string',
797
+ description: '排序',
798
+ options: [
799
+ { value: 'rawID_asc', label: 'RAWID 升序' },
800
+ { value: 'rawID_desc', label: 'RAWID 降序' },
801
+ { value: 'nameCol_asc', label: '名称 升序' },
802
+ { value: 'nameCol_desc', label: '名称 降序' },
803
+ { value: 'begin_asc', label: '计划开始 升序' },
804
+ { value: 'begin_desc', label: '计划开始 降序' },
805
+ { value: 'end_asc', label: '计划结束 升序' },
806
+ { value: 'end_desc', label: '计划结束 降序' },
807
+ ],
808
+ },
809
+ {
810
+ name: 'recPerPage',
811
+ required: false,
812
+ type: 'number',
813
+ description: '每页数量,不超过1000',
814
+ },
815
+ {
816
+ name: 'pageID',
817
+ required: false,
818
+ type: 'number',
819
+ description: '页码,从第1页开始',
820
+ },
821
+ ],
822
+ }, {
823
+ name: 'create',
824
+ display: '创建执行',
825
+ type: 'create',
826
+ method: 'post',
827
+ path: '/executions',
828
+ resultType: 'object',
829
+ requestBody: {
830
+ required: true,
831
+ type: 'object',
832
+ schema: {
833
+ "type": "object",
834
+ "properties": {
835
+ "project": {
836
+ "type": "integer",
837
+ "description": "所属项目",
838
+ "format": "int32"
839
+ },
840
+ "name": {
841
+ "type": "string",
842
+ "description": "迭代名称"
843
+ },
844
+ "lifetime": {
845
+ "type": "string",
846
+ "description": "执行类型(short 短期 | long 长期 | ops 运维)"
847
+ },
848
+ "begin": {
849
+ "type": "string",
850
+ "description": "开始日期"
851
+ },
852
+ "end": {
853
+ "type": "string",
854
+ "description": "结束日期"
855
+ },
856
+ "days": {
857
+ "type": "integer",
858
+ "description": "可用工作日",
859
+ "format": "int32"
860
+ },
861
+ "products": {
862
+ "type": "array",
863
+ "items": {
864
+ "type": "string"
865
+ },
866
+ "description": "关联产品"
867
+ },
868
+ "plans": {
869
+ "type": "array",
870
+ "items": {
871
+ "type": "string"
872
+ },
873
+ "description": "关联计划,必须是产品+planID的二维数组"
874
+ },
875
+ "PO": {
876
+ "type": "string",
877
+ "description": "产品负责人"
878
+ },
879
+ "QD": {
880
+ "type": "string",
881
+ "description": "测试负责人"
882
+ },
883
+ "PM": {
884
+ "type": "string",
885
+ "description": "执行负责人"
886
+ },
887
+ "RD": {
888
+ "type": "string",
889
+ "description": "发布负责人"
890
+ },
891
+ "acl": {
892
+ "type": "string",
893
+ "description": "访问控制(open 公开 | private 私有)"
894
+ }
895
+ },
896
+ "required": [
897
+ "project",
898
+ "name",
899
+ "begin",
900
+ "end"
901
+ ]
902
+ },
903
+ },
904
+ }, {
905
+ name: 'get',
906
+ display: '获取执行详情',
907
+ type: 'get',
908
+ method: 'get',
909
+ path: '/executions/{executionID}',
910
+ resultType: 'object',
911
+ resultGetter: 'execution',
912
+ pathParams: {
913
+ executionID: '执行ID',
914
+ },
915
+ }, {
916
+ name: 'update',
917
+ display: '修改执行',
918
+ type: 'update',
919
+ method: 'put',
920
+ path: '/executions/{executionID}',
921
+ resultType: 'object',
922
+ pathParams: {
923
+ executionID: '执行ID',
924
+ },
925
+ requestBody: {
926
+ required: true,
927
+ type: 'object',
928
+ schema: {
929
+ "type": "object",
930
+ "properties": {
931
+ "project": {
932
+ "type": "integer",
933
+ "description": "所属项目",
934
+ "format": "int32"
935
+ },
936
+ "name": {
937
+ "type": "string",
938
+ "description": "迭代名称"
939
+ },
940
+ "lifetime": {
941
+ "type": "string",
942
+ "description": "执行类型(short 短期 | long 长期 | ops 运维)"
943
+ },
944
+ "begin": {
945
+ "type": "string",
946
+ "description": "开始日期"
947
+ },
948
+ "end": {
949
+ "type": "string",
950
+ "description": "结束日期"
951
+ },
952
+ "days": {
953
+ "type": "integer",
954
+ "description": "可用工作日",
955
+ "format": "int32"
956
+ },
957
+ "products": {
958
+ "type": "array",
959
+ "items": {
960
+ "type": "string"
961
+ },
962
+ "description": "关联产品"
963
+ },
964
+ "plans": {
965
+ "type": "array",
966
+ "items": {
967
+ "type": "string"
968
+ },
969
+ "description": "关联计划,必须是产品+planID的二维数组"
970
+ },
971
+ "PO": {
972
+ "type": "string",
973
+ "description": "产品负责人"
974
+ },
975
+ "QD": {
976
+ "type": "string",
977
+ "description": "测试负责人"
978
+ },
979
+ "PM": {
980
+ "type": "string",
981
+ "description": "执行负责人"
982
+ },
983
+ "RD": {
984
+ "type": "string",
985
+ "description": "发布负责人"
986
+ },
987
+ "acl": {
988
+ "type": "string",
989
+ "description": "访问控制(open 公开 | private 私有)"
990
+ }
991
+ },
992
+ "required": [
993
+ "name",
994
+ "begin",
995
+ "end"
996
+ ]
997
+ },
998
+ },
999
+ }, {
1000
+ name: 'delete',
1001
+ display: '删除执行',
1002
+ type: 'delete',
1003
+ method: 'delete',
1004
+ path: '/executions/{executionID}',
1005
+ resultType: 'text',
1006
+ pathParams: {
1007
+ executionID: '执行ID',
1008
+ },
1009
+ render: 'action',
1010
+ }
1011
+ ],
1012
+ },
1013
+ /* 产品计划模块 */
1014
+ {
1015
+ name: 'productplan',
1016
+ display: '产品计划',
1017
+ description: '产品计划管理,支持获取产品计划列表,支持获取产品下的产品计划、创建产品计划、获取产品计划详情、修改产品计划、删除产品计划',
1018
+ actions: [
1019
+ {
1020
+ name: 'list',
1021
+ display: '获取产品计划列表,支持获取产品下的产品计划',
1022
+ type: 'list',
1023
+ method: 'get',
1024
+ path: '/{scope}/{scopeID}/productplans',
1025
+ resultType: 'list',
1026
+ pagerGetter: 'pager',
1027
+ resultGetter: 'productplans',
1028
+ pathParams: {
1029
+ scope: { description: '产品计划范围', options: [{ value: 'products', label: '产品' }] },
1030
+ scopeID: '范围ID',
1031
+ },
1032
+ params: [
1033
+ {
1034
+ name: 'browseType',
1035
+ required: false,
1036
+ type: 'string',
1037
+ description: '执行状态,默认是undone',
1038
+ defaultValue: 'undone',
1039
+ options: [
1040
+ { value: 'all', label: '全部' },
1041
+ { value: 'undone', label: '未完成' },
1042
+ { value: 'wait', label: '未开始' },
1043
+ { value: 'doing', label: '进行中' },
1044
+ ],
1045
+ },
1046
+ {
1047
+ name: 'orderBy',
1048
+ required: false,
1049
+ type: 'string',
1050
+ description: '排序',
1051
+ options: [
1052
+ { value: 'id_asc', label: 'ID 升序' },
1053
+ { value: 'id_desc', label: 'ID 降序' },
1054
+ { value: 'title_asc', label: '名称 升序' },
1055
+ { value: 'title_desc', label: '名称 降序' },
1056
+ { value: 'begin_asc', label: '开始日期 升序' },
1057
+ { value: 'begin_desc', label: '开始日期 降序' },
1058
+ { value: 'end_asc', label: '结束日期 升序' },
1059
+ { value: 'end_desc', label: '结束日期 降序' },
1060
+ { value: 'status_asc', label: '状态 升序' },
1061
+ ],
1062
+ },
1063
+ {
1064
+ name: 'recPerPage',
1065
+ required: false,
1066
+ type: 'number',
1067
+ description: '每页数量,不超过1000',
1068
+ },
1069
+ {
1070
+ name: 'pageID',
1071
+ required: false,
1072
+ type: 'number',
1073
+ description: '页码,从第1页开始',
1074
+ },
1075
+ ],
1076
+ }, {
1077
+ name: 'create',
1078
+ display: '创建产品计划',
1079
+ type: 'create',
1080
+ method: 'post',
1081
+ path: '/productplans',
1082
+ resultType: 'object',
1083
+ requestBody: {
1084
+ required: true,
1085
+ type: 'object',
1086
+ schema: {
1087
+ "type": "object",
1088
+ "properties": {
1089
+ "productID": {
1090
+ "type": "integer",
1091
+ "description": "产品ID",
1092
+ "format": "int32"
1093
+ },
1094
+ "title": {
1095
+ "type": "string",
1096
+ "description": "计划名称"
1097
+ },
1098
+ "parent": {
1099
+ "type": "integer",
1100
+ "description": "父计划ID",
1101
+ "format": "int32"
1102
+ },
1103
+ "begin": {
1104
+ "type": "string",
1105
+ "description": "开始日期"
1106
+ },
1107
+ "end": {
1108
+ "type": "string",
1109
+ "description": "结束日期"
1110
+ },
1111
+ "branchID": {
1112
+ "type": "integer",
1113
+ "description": "分支ID",
1114
+ "format": "int32"
1115
+ },
1116
+ "desc": {
1117
+ "type": "string",
1118
+ "description": "计划描述"
1119
+ }
1120
+ },
1121
+ "required": [
1122
+ "productID",
1123
+ "title"
1124
+ ]
1125
+ },
1126
+ },
1127
+ }, {
1128
+ name: 'get',
1129
+ display: '获取产品计划详情',
1130
+ type: 'get',
1131
+ method: 'get',
1132
+ path: '/productplans/{planID}',
1133
+ resultType: 'object',
1134
+ resultGetter: 'productplan',
1135
+ pathParams: {
1136
+ planID: '产品计划ID',
1137
+ },
1138
+ }, {
1139
+ name: 'update',
1140
+ display: '修改产品计划',
1141
+ type: 'update',
1142
+ method: 'put',
1143
+ path: '/productplans/{productplanID}',
1144
+ resultType: 'object',
1145
+ pathParams: {
1146
+ productplanID: '产品计划ID',
1147
+ },
1148
+ requestBody: {
1149
+ required: true,
1150
+ type: 'object',
1151
+ schema: {
1152
+ "type": "object",
1153
+ "properties": {
1154
+ "title": {
1155
+ "type": "string",
1156
+ "description": "计划名称"
1157
+ },
1158
+ "parent": {
1159
+ "type": "integer",
1160
+ "description": "父计划",
1161
+ "format": "int32"
1162
+ },
1163
+ "begin": {
1164
+ "type": "string",
1165
+ "description": "开始日期"
1166
+ },
1167
+ "end": {
1168
+ "type": "string",
1169
+ "description": "结束日期"
1170
+ },
1171
+ "branchID": {
1172
+ "type": "integer",
1173
+ "description": "分支ID",
1174
+ "format": "int32"
1175
+ },
1176
+ "desc": {
1177
+ "type": "string",
1178
+ "description": "计划描述"
1179
+ }
1180
+ },
1181
+ "required": [
1182
+ "title"
1183
+ ]
1184
+ },
1185
+ },
1186
+ }, {
1187
+ name: 'delete',
1188
+ display: '删除产品计划',
1189
+ type: 'delete',
1190
+ method: 'delete',
1191
+ path: '/productplans/{productplanID}',
1192
+ resultType: 'text',
1193
+ pathParams: {
1194
+ productplanID: '产品计划ID',
1195
+ },
1196
+ render: 'action',
1197
+ }
1198
+ ],
1199
+ },
1200
+ /* 需求模块 */
1201
+ {
1202
+ name: 'story',
1203
+ display: '需求',
1204
+ description: '需求管理,支持获取需求列表,支持获取产品/项目/执行下的需求、创建需求、获取需求详情、修改需求、删除需求、激活需求、变更需求、关闭需求',
1205
+ actions: [
1206
+ {
1207
+ name: 'list',
1208
+ display: '获取需求列表,支持获取产品/项目/执行下的需求',
1209
+ type: 'list',
1210
+ method: 'get',
1211
+ path: '/{scope}/{scopeID}/stories',
1212
+ resultType: 'list',
1213
+ pagerGetter: 'pager',
1214
+ resultGetter: 'stories',
1215
+ pathParams: {
1216
+ scope: { description: '需求范围', options: [{ value: 'products', label: '产品' }, { value: 'projects', label: '项目' }, { value: 'executions', label: '执行' }] },
1217
+ scopeID: '范围ID',
1218
+ },
1219
+ params: [
1220
+ {
1221
+ name: 'browseType',
1222
+ required: false,
1223
+ type: 'string',
1224
+ description: '状态,默认是unclosed',
1225
+ defaultValue: 'unclosed',
1226
+ options: [
1227
+ { value: 'allstory', label: '全部' },
1228
+ { value: 'assignedtome', label: '指派给我' },
1229
+ { value: 'openedbyme', label: '我创建' },
1230
+ { value: 'reviewbyme', label: '待我评审' },
1231
+ { value: 'draftstory', label: '草稿' },
1232
+ ],
1233
+ },
1234
+ {
1235
+ name: 'orderBy',
1236
+ required: false,
1237
+ type: 'string',
1238
+ description: '排序',
1239
+ options: [
1240
+ { value: 'id_asc', label: 'ID 升序' },
1241
+ { value: 'id_desc', label: 'ID 降序' },
1242
+ { value: 'title_asc', label: '标题 升序' },
1243
+ { value: 'title_desc', label: '标题 降序' },
1244
+ { value: 'status_asc', label: '状态 升序' },
1245
+ { value: 'status_desc', label: '状态 降序' },
1246
+ ],
1247
+ },
1248
+ {
1249
+ name: 'recPerPage',
1250
+ required: false,
1251
+ type: 'number',
1252
+ description: '每页数量,不超过1000',
1253
+ },
1254
+ {
1255
+ name: 'pageID',
1256
+ required: false,
1257
+ type: 'number',
1258
+ description: '页码,从第1页开始',
1259
+ },
1260
+ ],
1261
+ }, {
1262
+ name: 'create',
1263
+ display: '创建需求',
1264
+ type: 'create',
1265
+ method: 'post',
1266
+ path: '/stories',
1267
+ resultType: 'object',
1268
+ requestBody: {
1269
+ required: true,
1270
+ type: 'object',
1271
+ schema: {
1272
+ "type": "object",
1273
+ "properties": {
1274
+ "productID": {
1275
+ "type": "integer",
1276
+ "description": "产品ID",
1277
+ "format": "int32"
1278
+ },
1279
+ "title": {
1280
+ "type": "string"
1281
+ },
1282
+ "pri": {
1283
+ "type": "integer",
1284
+ "description": "优先级,默认是3",
1285
+ "format": "int32"
1286
+ },
1287
+ "module": {
1288
+ "type": "integer",
1289
+ "description": "所属模块",
1290
+ "format": "int32"
1291
+ },
1292
+ "parent": {
1293
+ "type": "integer",
1294
+ "description": "父需求",
1295
+ "format": "int32"
1296
+ },
1297
+ "estimate": {
1298
+ "type": "number",
1299
+ "description": "预计工时",
1300
+ "format": "float"
1301
+ },
1302
+ "spec": {
1303
+ "type": "string",
1304
+ "description": "需求描述"
1305
+ },
1306
+ "category": {
1307
+ "type": "integer",
1308
+ "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",
1309
+ "format": "int32"
1310
+ },
1311
+ "source": {
1312
+ "type": "string",
1313
+ "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"
1314
+ },
1315
+ "verify": {
1316
+ "type": "string",
1317
+ "description": "验收标准"
1318
+ },
1319
+ "assignedTo": {
1320
+ "type": "string",
1321
+ "description": "指派给"
1322
+ },
1323
+ "reviewer": {
1324
+ "type": "array",
1325
+ "items": {
1326
+ "type": "string"
1327
+ },
1328
+ "description": "评审人,如果设置必须评审,必须填写"
1329
+ },
1330
+ "project": {
1331
+ "type": "integer",
1332
+ "description": "所属项目",
1333
+ "format": "int32"
1334
+ },
1335
+ "execution": {
1336
+ "type": "integer",
1337
+ "description": "所属执行",
1338
+ "format": "int32"
1339
+ }
1340
+ },
1341
+ "required": [
1342
+ "productID",
1343
+ "title"
1344
+ ]
1345
+ },
1346
+ },
1347
+ }, {
1348
+ name: 'get',
1349
+ display: '获取需求详情',
1350
+ type: 'get',
1351
+ method: 'get',
1352
+ path: '/stories/{storyID}',
1353
+ resultType: 'object',
1354
+ resultGetter: 'story',
1355
+ pathParams: {
1356
+ storyID: '需求ID',
1357
+ },
1358
+ }, {
1359
+ name: 'update',
1360
+ display: '修改需求',
1361
+ type: 'update',
1362
+ method: 'put',
1363
+ path: '/stories/{storyID}',
1364
+ resultType: 'object',
1365
+ pathParams: {
1366
+ storyID: '需求ID',
1367
+ },
1368
+ requestBody: {
1369
+ required: true,
1370
+ type: 'object',
1371
+ schema: {
1372
+ "type": "object",
1373
+ "properties": {
1374
+ "title": {
1375
+ "type": "string"
1376
+ },
1377
+ "pri": {
1378
+ "type": "integer",
1379
+ "description": "优先级,默认是3",
1380
+ "format": "int32"
1381
+ },
1382
+ "module": {
1383
+ "type": "integer",
1384
+ "description": "所属模块",
1385
+ "format": "int32"
1386
+ },
1387
+ "parent": {
1388
+ "type": "integer",
1389
+ "description": "父需求",
1390
+ "format": "int32"
1391
+ },
1392
+ "estimate": {
1393
+ "type": "number",
1394
+ "description": "预计工时",
1395
+ "format": "float"
1396
+ },
1397
+ "category": {
1398
+ "type": "integer",
1399
+ "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",
1400
+ "format": "int32"
1401
+ },
1402
+ "source": {
1403
+ "type": "string",
1404
+ "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"
1405
+ },
1406
+ "assignedTo": {
1407
+ "type": "string",
1408
+ "description": "指派给"
1409
+ }
1410
+ },
1411
+ "required": [
1412
+ "title"
1413
+ ]
1414
+ },
1415
+ },
1416
+ }, {
1417
+ name: 'delete',
1418
+ display: '删除需求',
1419
+ type: 'delete',
1420
+ method: 'delete',
1421
+ path: '/stories/{storyID}',
1422
+ resultType: 'text',
1423
+ pathParams: {
1424
+ storyID: '需求ID',
1425
+ },
1426
+ render: 'action',
1427
+ }, {
1428
+ name: 'activate',
1429
+ display: '激活需求',
1430
+ type: 'action',
1431
+ method: 'put',
1432
+ path: '/stories/{storyID}/activate',
1433
+ resultType: 'text',
1434
+ pathParams: {
1435
+ storyID: '需求ID',
1436
+ },
1437
+ requestBody: {
1438
+ required: true,
1439
+ type: 'object',
1440
+ schema: {
1441
+ "type": "object",
1442
+ "properties": {
1443
+ "assignedTo": {
1444
+ "type": "string",
1445
+ "description": "指派给"
1446
+ },
1447
+ "comment": {
1448
+ "type": "string",
1449
+ "description": "备注"
1450
+ }
1451
+ }
1452
+ },
1453
+ },
1454
+ render: 'action',
1455
+ }, {
1456
+ name: 'change',
1457
+ display: '变更需求',
1458
+ type: 'action',
1459
+ method: 'put',
1460
+ path: '/stories/{storyID}/change',
1461
+ resultType: 'text',
1462
+ pathParams: {
1463
+ storyID: '需求ID',
1464
+ },
1465
+ requestBody: {
1466
+ required: true,
1467
+ type: 'object',
1468
+ schema: {
1469
+ "type": "object",
1470
+ "properties": {
1471
+ "title": {
1472
+ "type": "string",
1473
+ "description": "需求名称"
1474
+ },
1475
+ "reviewer": {
1476
+ "type": "array",
1477
+ "items": {
1478
+ "type": "string"
1479
+ },
1480
+ "description": "评审人员"
1481
+ },
1482
+ "spec": {
1483
+ "type": "string",
1484
+ "description": "需求描述"
1485
+ },
1486
+ "verify": {
1487
+ "type": "string",
1488
+ "description": "验收标准"
1489
+ }
1490
+ },
1491
+ "required": [
1492
+ "reviewer"
1493
+ ]
1494
+ },
1495
+ },
1496
+ render: 'action',
1497
+ }, {
1498
+ name: 'close',
1499
+ display: '关闭需求',
1500
+ type: 'action',
1501
+ method: 'put',
1502
+ path: '/stories/{storyID}/close',
1503
+ resultType: 'text',
1504
+ pathParams: {
1505
+ storyID: '需求ID',
1506
+ },
1507
+ requestBody: {
1508
+ required: true,
1509
+ type: 'object',
1510
+ schema: {
1511
+ "type": "object",
1512
+ "properties": {
1513
+ "closedReason": {
1514
+ "type": "string",
1515
+ "description": "关闭原因(done 已完成 | subdivided 已拆分 | duplicate 重复 | postponed 延期 | willnotdo 不做 | cancel 已取消 | bydesign 设计如此)"
1516
+ },
1517
+ "comment": {
1518
+ "type": "string",
1519
+ "description": "备注"
1520
+ }
1521
+ },
1522
+ "required": [
1523
+ "closedReason"
1524
+ ]
1525
+ },
1526
+ },
1527
+ render: 'action',
1528
+ }
1529
+ ],
1530
+ },
1531
+ /* 业务需求模块 */
1532
+ {
1533
+ name: 'epic',
1534
+ display: '业务需求',
1535
+ description: '业务需求管理,支持获取业务需求列表,支持获取产品下的业务需求、创建业务需求、获取业务需求详情、修改业务需求、删除业务需求、激活业务需求、变更业务需求、关闭业务需求',
1536
+ actions: [
1537
+ {
1538
+ name: 'list',
1539
+ display: '获取业务需求列表,支持获取产品下的业务需求',
1540
+ type: 'list',
1541
+ method: 'get',
1542
+ path: '/{scope}/{scopeID}/epics',
1543
+ resultType: 'list',
1544
+ pagerGetter: 'pager',
1545
+ resultGetter: 'epics',
1546
+ pathParams: {
1547
+ scope: { description: '业务需求范围', options: [{ value: 'products', label: '产品' }] },
1548
+ scopeID: '范围ID',
1549
+ },
1550
+ params: [
1551
+ {
1552
+ name: 'browseType',
1553
+ required: false,
1554
+ type: 'string',
1555
+ description: '状态,默认是unclosed',
1556
+ defaultValue: 'unclosed',
1557
+ options: [
1558
+ { value: 'allstory', label: '全部' },
1559
+ { value: 'assignedtome', label: '指派给我' },
1560
+ { value: 'openedbyme', label: '我创建' },
1561
+ { value: 'reviewbyme', label: '待我评审' },
1562
+ { value: 'draftstory', label: '草稿' },
1563
+ ],
1564
+ },
1565
+ {
1566
+ name: 'orderBy',
1567
+ required: false,
1568
+ type: 'string',
1569
+ description: '排序',
1570
+ options: [
1571
+ { value: 'id_asc', label: 'ID 升序' },
1572
+ { value: 'id_desc', label: 'ID 降序' },
1573
+ { value: 'title_asc', label: '标题 升序' },
1574
+ { value: 'title_desc', label: '标题 降序' },
1575
+ { value: 'status_asc', label: '状态 升序' },
1576
+ { value: 'status_desc', label: '状态 降序' },
1577
+ ],
1578
+ },
1579
+ {
1580
+ name: 'recPerPage',
1581
+ required: false,
1582
+ type: 'number',
1583
+ description: '每页数量,不超过1000',
1584
+ },
1585
+ {
1586
+ name: 'pageID',
1587
+ required: false,
1588
+ type: 'number',
1589
+ description: '页码,从第1页开始',
1590
+ },
1591
+ ],
1592
+ }, {
1593
+ name: 'create',
1594
+ display: '创建业务需求',
1595
+ type: 'create',
1596
+ method: 'post',
1597
+ path: '/epics',
1598
+ resultType: 'object',
1599
+ requestBody: {
1600
+ required: true,
1601
+ type: 'object',
1602
+ schema: {
1603
+ "type": "object",
1604
+ "properties": {
1605
+ "productID": {
1606
+ "type": "integer",
1607
+ "description": "产品ID",
1608
+ "format": "int32"
1609
+ },
1610
+ "title": {
1611
+ "type": "string"
1612
+ },
1613
+ "pri": {
1614
+ "type": "integer",
1615
+ "description": "优先级,默认是3",
1616
+ "format": "int32"
1617
+ },
1618
+ "module": {
1619
+ "type": "integer",
1620
+ "description": "所属模块",
1621
+ "format": "int32"
1622
+ },
1623
+ "parent": {
1624
+ "type": "integer",
1625
+ "description": "父业务需求",
1626
+ "format": "int32"
1627
+ },
1628
+ "estimate": {
1629
+ "type": "number",
1630
+ "description": "预计工时",
1631
+ "format": "float"
1632
+ },
1633
+ "spec": {
1634
+ "type": "string",
1635
+ "description": "业务需求描述"
1636
+ },
1637
+ "category": {
1638
+ "type": "integer",
1639
+ "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",
1640
+ "format": "int32"
1641
+ },
1642
+ "source": {
1643
+ "type": "string",
1644
+ "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"
1645
+ },
1646
+ "verify": {
1647
+ "type": "string",
1648
+ "description": "验收标准"
1649
+ },
1650
+ "assignedTo": {
1651
+ "type": "string",
1652
+ "description": "指派给"
1653
+ },
1654
+ "reviewer": {
1655
+ "type": "array",
1656
+ "items": {
1657
+ "type": "string"
1658
+ },
1659
+ "description": "评审人,如果设置必须评审,必须填写"
1660
+ }
1661
+ },
1662
+ "required": [
1663
+ "productID",
1664
+ "title"
1665
+ ]
1666
+ },
1667
+ },
1668
+ }, {
1669
+ name: 'get',
1670
+ display: '获取业务需求详情',
1671
+ type: 'get',
1672
+ method: 'get',
1673
+ path: '/epics/{storyID}',
1674
+ resultType: 'object',
1675
+ resultGetter: 'epic',
1676
+ pathParams: {
1677
+ storyID: '需求ID',
1678
+ },
1679
+ }, {
1680
+ name: 'update',
1681
+ display: '修改业务需求',
1682
+ type: 'update',
1683
+ method: 'put',
1684
+ path: '/epics/{epicID}',
1685
+ resultType: 'object',
1686
+ pathParams: {
1687
+ epicID: '业务需求ID',
1688
+ },
1689
+ requestBody: {
1690
+ required: true,
1691
+ type: 'object',
1692
+ schema: {
1693
+ "type": "object",
1694
+ "properties": {
1695
+ "title": {
1696
+ "type": "string",
1697
+ "description": "需求名称"
1698
+ },
1699
+ "pri": {
1700
+ "type": "integer",
1701
+ "description": "优先级,默认是3",
1702
+ "format": "int32"
1703
+ },
1704
+ "module": {
1705
+ "type": "integer",
1706
+ "description": "所属模块",
1707
+ "format": "int32"
1708
+ },
1709
+ "parent": {
1710
+ "type": "integer",
1711
+ "description": "父业务需求",
1712
+ "format": "int32"
1713
+ },
1714
+ "estimate": {
1715
+ "type": "number",
1716
+ "description": "预计工时",
1717
+ "format": "float"
1718
+ },
1719
+ "category": {
1720
+ "type": "integer",
1721
+ "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",
1722
+ "format": "int32"
1723
+ },
1724
+ "source": {
1725
+ "type": "string",
1726
+ "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"
1727
+ },
1728
+ "assignedTo": {
1729
+ "type": "string",
1730
+ "description": "指派给"
1731
+ }
1732
+ },
1733
+ "required": [
1734
+ "title"
1735
+ ]
1736
+ },
1737
+ },
1738
+ }, {
1739
+ name: 'delete',
1740
+ display: '删除业务需求',
1741
+ type: 'delete',
1742
+ method: 'delete',
1743
+ path: '/epics/{epicID}',
1744
+ resultType: 'text',
1745
+ pathParams: {
1746
+ epicID: '业务需求ID',
1747
+ },
1748
+ render: 'action',
1749
+ }, {
1750
+ name: 'activate',
1751
+ display: '激活业务需求',
1752
+ type: 'action',
1753
+ method: 'put',
1754
+ path: '/epics/{epicID}/activate',
1755
+ resultType: 'text',
1756
+ pathParams: {
1757
+ epicID: '业务需求ID',
1758
+ },
1759
+ requestBody: {
1760
+ required: true,
1761
+ type: 'object',
1762
+ schema: {
1763
+ "type": "object",
1764
+ "properties": {
1765
+ "assignedTo": {
1766
+ "type": "string",
1767
+ "description": "指派给"
1768
+ },
1769
+ "comment": {
1770
+ "type": "string",
1771
+ "description": "备注"
1772
+ }
1773
+ }
1774
+ },
1775
+ },
1776
+ render: 'action',
1777
+ }, {
1778
+ name: 'change',
1779
+ display: '变更业务需求',
1780
+ type: 'action',
1781
+ method: 'put',
1782
+ path: '/epics/{epicID}/change',
1783
+ resultType: 'text',
1784
+ pathParams: {
1785
+ epicID: '业务需求ID',
1786
+ },
1787
+ requestBody: {
1788
+ required: true,
1789
+ type: 'object',
1790
+ schema: {
1791
+ "type": "object",
1792
+ "properties": {
1793
+ "title": {
1794
+ "type": "string",
1795
+ "description": "需求名称"
1796
+ },
1797
+ "reviewer": {
1798
+ "type": "array",
1799
+ "items": {
1800
+ "type": "string"
1801
+ },
1802
+ "description": "评审人员"
1803
+ },
1804
+ "spec": {
1805
+ "type": "string",
1806
+ "description": "需求描述"
1807
+ },
1808
+ "verify": {
1809
+ "type": "string",
1810
+ "description": "验收标准"
1811
+ }
1812
+ },
1813
+ "required": [
1814
+ "reviewer"
1815
+ ]
1816
+ },
1817
+ },
1818
+ render: 'action',
1819
+ }, {
1820
+ name: 'close',
1821
+ display: '关闭业务需求',
1822
+ type: 'action',
1823
+ method: 'put',
1824
+ path: '/epics/{epicID}/close',
1825
+ resultType: 'text',
1826
+ pathParams: {
1827
+ epicID: '业务需求ID',
1828
+ },
1829
+ requestBody: {
1830
+ required: true,
1831
+ type: 'object',
1832
+ schema: {
1833
+ "type": "object",
1834
+ "properties": {
1835
+ "closedReason": {
1836
+ "type": "string",
1837
+ "description": "关闭原因(done 已完成 | subdivided 已拆分 | duplicate 重复 | postponed 延期 | willnotdo 不做 | cancel 已取消 | bydesign 设计如此)"
1838
+ },
1839
+ "comment": {
1840
+ "type": "string",
1841
+ "description": "备注"
1842
+ }
1843
+ },
1844
+ "required": [
1845
+ "closedReason"
1846
+ ]
1847
+ },
1848
+ },
1849
+ render: 'action',
1850
+ }
1851
+ ],
1852
+ },
1853
+ /* 用户需求模块 */
1854
+ {
1855
+ name: 'requirement',
1856
+ display: '用户需求',
1857
+ description: '用户需求管理,支持获取用户需求列表,支持获取产品下的用户需求、创建用户需求、获取用户需求详情、修改用户需求、删除用户需求、激活用户需求、变更用户需求、关闭用户需求',
1858
+ actions: [
1859
+ {
1860
+ name: 'list',
1861
+ display: '获取用户需求列表,支持获取产品下的用户需求',
1862
+ type: 'list',
1863
+ method: 'get',
1864
+ path: '/{scope}/{scopeID}/requirements',
1865
+ resultType: 'list',
1866
+ pagerGetter: 'pager',
1867
+ resultGetter: 'requirements',
1868
+ pathParams: {
1869
+ scope: { description: '用户需求范围', options: [{ value: 'products', label: '产品' }] },
1870
+ scopeID: '范围ID',
1871
+ },
1872
+ params: [
1873
+ {
1874
+ name: 'browseType',
1875
+ required: false,
1876
+ type: 'string',
1877
+ description: '状态,默认是unclosed',
1878
+ defaultValue: 'unclosed',
1879
+ options: [
1880
+ { value: 'allstory', label: '全部' },
1881
+ { value: 'assignedtome', label: '指派给我' },
1882
+ { value: 'openedbyme', label: '我创建' },
1883
+ { value: 'reviewbyme', label: '待我评审' },
1884
+ { value: 'draftstory', label: '草稿' },
1885
+ ],
1886
+ },
1887
+ {
1888
+ name: 'orderBy',
1889
+ required: false,
1890
+ type: 'string',
1891
+ description: '排序',
1892
+ options: [
1893
+ { value: 'id_asc', label: 'ID 升序' },
1894
+ { value: 'id_desc', label: 'ID 降序' },
1895
+ { value: 'title_asc', label: '标题 升序' },
1896
+ { value: 'title_desc', label: '标题 降序' },
1897
+ { value: 'status_asc', label: '状态 升序' },
1898
+ { value: 'status_desc', label: '状态 降序' },
1899
+ ],
1900
+ },
1901
+ {
1902
+ name: 'recPerPage',
1903
+ required: false,
1904
+ type: 'number',
1905
+ description: '每页数量,不超过1000',
1906
+ },
1907
+ {
1908
+ name: 'pageID',
1909
+ required: false,
1910
+ type: 'number',
1911
+ description: '页码,从第1页开始',
1912
+ },
1913
+ ],
1914
+ }, {
1915
+ name: 'create',
1916
+ display: '创建用户需求',
1917
+ type: 'create',
1918
+ method: 'post',
1919
+ path: '/requirements',
1920
+ resultType: 'object',
1921
+ requestBody: {
1922
+ required: true,
1923
+ type: 'object',
1924
+ schema: {
1925
+ "type": "object",
1926
+ "properties": {
1927
+ "productID": {
1928
+ "type": "integer",
1929
+ "description": "产品ID",
1930
+ "format": "int32"
1931
+ },
1932
+ "title": {
1933
+ "type": "string"
1934
+ },
1935
+ "pri": {
1936
+ "type": "integer",
1937
+ "description": "优先级,默认是3",
1938
+ "format": "int32"
1939
+ },
1940
+ "module": {
1941
+ "type": "integer",
1942
+ "description": "所属模块",
1943
+ "format": "int32"
1944
+ },
1945
+ "parent": {
1946
+ "type": "integer",
1947
+ "description": "父用户需求",
1948
+ "format": "int32"
1949
+ },
1950
+ "estimate": {
1951
+ "type": "number",
1952
+ "description": "预计工时",
1953
+ "format": "float"
1954
+ },
1955
+ "spec": {
1956
+ "type": "string",
1957
+ "description": "用户需求描述"
1958
+ },
1959
+ "category": {
1960
+ "type": "integer",
1961
+ "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",
1962
+ "format": "int32"
1963
+ },
1964
+ "source": {
1965
+ "type": "string",
1966
+ "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"
1967
+ },
1968
+ "verify": {
1969
+ "type": "string",
1970
+ "description": "验收标准"
1971
+ },
1972
+ "assignedTo": {
1973
+ "type": "string",
1974
+ "description": "指派给"
1975
+ },
1976
+ "reviewer": {
1977
+ "type": "array",
1978
+ "items": {
1979
+ "type": "string"
1980
+ },
1981
+ "description": "评审人,如果设置必须评审,必须填写"
1982
+ }
1983
+ },
1984
+ "required": [
1985
+ "productID",
1986
+ "title"
1987
+ ]
1988
+ },
1989
+ },
1990
+ }, {
1991
+ name: 'get',
1992
+ display: '获取用户需求详情',
1993
+ type: 'get',
1994
+ method: 'get',
1995
+ path: '/requirements/{storyID}',
1996
+ resultType: 'object',
1997
+ resultGetter: 'requirement',
1998
+ pathParams: {
1999
+ storyID: '需求ID',
2000
+ },
2001
+ }, {
2002
+ name: 'update',
2003
+ display: '修改用户需求',
2004
+ type: 'update',
2005
+ method: 'put',
2006
+ path: '/requirements/{requirementID}',
2007
+ resultType: 'object',
2008
+ pathParams: {
2009
+ requirementID: '用户需求ID',
2010
+ },
2011
+ requestBody: {
2012
+ required: true,
2013
+ type: 'object',
2014
+ schema: {
2015
+ "type": "object",
2016
+ "properties": {
2017
+ "title": {
2018
+ "type": "string"
2019
+ },
2020
+ "pri": {
2021
+ "type": "integer",
2022
+ "description": "优先级,默认是3",
2023
+ "format": "int32"
2024
+ },
2025
+ "module": {
2026
+ "type": "integer",
2027
+ "description": "所属模块",
2028
+ "format": "int32"
2029
+ },
2030
+ "parent": {
2031
+ "type": "integer",
2032
+ "description": "父用户需求",
2033
+ "format": "int32"
2034
+ },
2035
+ "estimate": {
2036
+ "type": "number",
2037
+ "description": "预计工时",
2038
+ "format": "float"
2039
+ },
2040
+ "category": {
2041
+ "type": "integer",
2042
+ "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)",
2043
+ "format": "int32"
2044
+ },
2045
+ "source": {
2046
+ "type": "string",
2047
+ "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)"
2048
+ },
2049
+ "assignedTo": {
2050
+ "type": "string",
2051
+ "description": "指派给"
2052
+ }
2053
+ },
2054
+ "required": [
2055
+ "title"
2056
+ ]
2057
+ },
2058
+ },
2059
+ }, {
2060
+ name: 'delete',
2061
+ display: '删除用户需求',
2062
+ type: 'delete',
2063
+ method: 'delete',
2064
+ path: '/requirements/{requirementID}',
2065
+ resultType: 'text',
2066
+ pathParams: {
2067
+ requirementID: '用户需求ID',
2068
+ },
2069
+ render: 'action',
2070
+ }, {
2071
+ name: 'activate',
2072
+ display: '激活用户需求',
2073
+ type: 'action',
2074
+ method: 'put',
2075
+ path: '/requirements/{requirementID}/activate',
2076
+ resultType: 'text',
2077
+ pathParams: {
2078
+ requirementID: '用户需求ID',
2079
+ },
2080
+ requestBody: {
2081
+ required: true,
2082
+ type: 'object',
2083
+ schema: {
2084
+ "type": "object",
2085
+ "properties": {
2086
+ "assignedTo": {
2087
+ "type": "string",
2088
+ "description": "指派给"
2089
+ },
2090
+ "comment": {
2091
+ "type": "string",
2092
+ "description": "备注"
2093
+ }
2094
+ }
2095
+ },
2096
+ },
2097
+ render: 'action',
2098
+ }, {
2099
+ name: 'change',
2100
+ display: '变更用户需求',
2101
+ type: 'action',
2102
+ method: 'put',
2103
+ path: '/requirements/{requirementID}/change',
2104
+ resultType: 'text',
2105
+ pathParams: {
2106
+ requirementID: '用户需求ID',
2107
+ },
2108
+ requestBody: {
2109
+ required: true,
2110
+ type: 'object',
2111
+ schema: {
2112
+ "type": "object",
2113
+ "properties": {
2114
+ "title": {
2115
+ "type": "string",
2116
+ "description": "需求名称"
2117
+ },
2118
+ "spec": {
2119
+ "type": "string",
2120
+ "description": "需求描述"
2121
+ },
2122
+ "verify": {
2123
+ "type": "string",
2124
+ "description": "验收标准"
2125
+ }
2126
+ }
2127
+ },
2128
+ },
2129
+ render: 'action',
2130
+ }, {
2131
+ name: 'close',
2132
+ display: '关闭用户需求',
2133
+ type: 'action',
2134
+ method: 'put',
2135
+ path: '/requirements/{requirementID}/close',
2136
+ resultType: 'text',
2137
+ pathParams: {
2138
+ requirementID: '用户需求ID',
2139
+ },
2140
+ requestBody: {
2141
+ required: true,
2142
+ type: 'object',
2143
+ schema: {
2144
+ "type": "object",
2145
+ "properties": {
2146
+ "closedReason": {
2147
+ "type": "string",
2148
+ "description": "关闭原因(done 已完成 | subdivided 已拆分 | duplicate 重复 | postponed 延期 | willnotdo 不做 | cancel 已取消 | bydesign 设计如此)"
2149
+ },
2150
+ "comment": {
2151
+ "type": "string",
2152
+ "description": "备注"
2153
+ }
2154
+ },
2155
+ "required": [
2156
+ "closedReason"
2157
+ ]
2158
+ },
2159
+ },
2160
+ render: 'action',
2161
+ }
2162
+ ],
2163
+ },
2164
+ /* Bug模块 */
2165
+ {
2166
+ name: 'bug',
2167
+ display: 'Bug',
2168
+ description: 'Bug管理,支持获取Bug列表,支持获取产品/项目/执行下的Bug、创建Bug、获取Bug详情、修改Bug、删除Bug、激活Bug、关闭Bug、解决Bug',
2169
+ actions: [
2170
+ {
2171
+ name: 'list',
2172
+ display: '获取Bug列表,支持获取产品/项目/执行下的Bug',
2173
+ type: 'list',
2174
+ method: 'get',
2175
+ path: '/{scope}/{scopeID}/bugs',
2176
+ resultType: 'list',
2177
+ pagerGetter: 'pager',
2178
+ resultGetter: 'bugs',
2179
+ pathParams: {
2180
+ scope: { description: 'Bug范围', options: [{ value: 'products', label: '产品' }, { value: 'projects', label: '项目' }, { value: 'executions', label: '执行' }] },
2181
+ scopeID: '范围ID',
2182
+ },
2183
+ params: [
2184
+ {
2185
+ name: 'browseType',
2186
+ required: false,
2187
+ type: 'string',
2188
+ description: '状态,默认是unclosed',
2189
+ defaultValue: 'unclosed',
2190
+ options: [
2191
+ { value: 'all', label: '全部' },
2192
+ { value: 'unclosed', label: '未关闭' },
2193
+ { value: 'assignedtome', label: '指派给我' },
2194
+ { value: 'openedbyme', label: '我创建' },
2195
+ { value: 'assignedbyme', label: '由我指派' },
2196
+ ],
2197
+ },
2198
+ {
2199
+ name: 'orderBy',
2200
+ required: false,
2201
+ type: 'string',
2202
+ description: '排序',
2203
+ options: [
2204
+ { value: 'id_asc', label: 'ID 升序' },
2205
+ { value: 'id_desc', label: 'ID 降序' },
2206
+ { value: 'title_asc', label: '标题 升序' },
2207
+ { value: 'title_desc', label: '标题 降序' },
2208
+ { value: 'status_asc', label: '状态 升序' },
2209
+ { value: 'status_desc', label: '状态 降序' },
2210
+ ],
2211
+ },
2212
+ {
2213
+ name: 'recPerPage',
2214
+ required: false,
2215
+ type: 'number',
2216
+ description: '每页数量,不超过1000',
2217
+ },
2218
+ {
2219
+ name: 'pageID',
2220
+ required: false,
2221
+ type: 'number',
2222
+ description: '页码,从第1页开始',
2223
+ },
2224
+ ],
2225
+ }, {
2226
+ name: 'create',
2227
+ display: '创建Bug',
2228
+ type: 'create',
2229
+ method: 'post',
2230
+ path: '/bugs',
2231
+ resultType: 'object',
2232
+ requestBody: {
2233
+ required: true,
2234
+ type: 'object',
2235
+ schema: {
2236
+ "type": "object",
2237
+ "properties": {
2238
+ "productID": {
2239
+ "type": "integer",
2240
+ "description": "所属产品",
2241
+ "format": "int32"
2242
+ },
2243
+ "title": {
2244
+ "type": "string",
2245
+ "description": "Bug标题"
2246
+ },
2247
+ "openedBuild": {
2248
+ "type": "array",
2249
+ "items": {
2250
+ "type": "string"
2251
+ },
2252
+ "description": "影响版本,主干是trunk,其他版本使用版本ID"
2253
+ },
2254
+ "project": {
2255
+ "type": "integer",
2256
+ "description": "所属项目",
2257
+ "format": "int32"
2258
+ },
2259
+ "execution": {
2260
+ "type": "integer",
2261
+ "description": "所属执行",
2262
+ "format": "int32"
2263
+ },
2264
+ "severity": {
2265
+ "type": "integer",
2266
+ "description": "严重程度,默认是3",
2267
+ "format": "int32"
2268
+ },
2269
+ "pri": {
2270
+ "type": "integer",
2271
+ "description": "优先级,默认是3",
2272
+ "format": "int32"
2273
+ },
2274
+ "type": {
2275
+ "type": "string",
2276
+ "description": "Bug类型(codeerror 代码错误 | config 配置相关 | install 安装部署 | security 安全相关 | performance 性能问题 | standard 标准规范 | automation 测试脚本 | designdefect 设计缺陷 | others 其他)"
2277
+ },
2278
+ "steps": {
2279
+ "type": "string",
2280
+ "description": "重现步骤"
2281
+ },
2282
+ "story": {
2283
+ "type": "integer",
2284
+ "description": "相关需求",
2285
+ "format": "int32"
2286
+ }
2287
+ },
2288
+ "required": [
2289
+ "productID",
2290
+ "title",
2291
+ "openedBuild"
2292
+ ]
2293
+ },
2294
+ },
2295
+ }, {
2296
+ name: 'get',
2297
+ display: '获取Bug详情',
2298
+ type: 'get',
2299
+ method: 'get',
2300
+ path: '/bugs/{bugID}',
2301
+ resultType: 'object',
2302
+ resultGetter: 'bug',
2303
+ pathParams: {
2304
+ bugID: 'Bug ID',
2305
+ },
2306
+ }, {
2307
+ name: 'update',
2308
+ display: '修改Bug',
2309
+ type: 'update',
2310
+ method: 'put',
2311
+ path: '/bugs/{bugID}',
2312
+ resultType: 'object',
2313
+ pathParams: {
2314
+ bugID: 'Bug ID',
2315
+ },
2316
+ requestBody: {
2317
+ required: true,
2318
+ type: 'object',
2319
+ schema: {
2320
+ "type": "object",
2321
+ "properties": {
2322
+ "title": {
2323
+ "type": "string",
2324
+ "description": "Bug标题"
2325
+ },
2326
+ "severity": {
2327
+ "type": "integer",
2328
+ "description": "严重程度,默认是3",
2329
+ "format": "int32"
2330
+ },
2331
+ "pri": {
2332
+ "type": "integer",
2333
+ "description": "优先级,默认是3",
2334
+ "format": "int32"
2335
+ },
2336
+ "type": {
2337
+ "type": "string",
2338
+ "description": "Bug类型(codeerror 代码错误 | config 配置相关 | install 安装部署 | security 安全相关 | performance 性能问题 | standard 标准规范 | automation 测试脚本 | designdefect 设计缺陷 | others 其他)"
2339
+ },
2340
+ "openedBuild": {
2341
+ "type": "array",
2342
+ "items": {
2343
+ "type": "string"
2344
+ },
2345
+ "description": "影响版本,主干是trunk,其他版本使用版本ID"
2346
+ },
2347
+ "steps": {
2348
+ "type": "string",
2349
+ "description": "重现步骤"
2350
+ },
2351
+ "project": {
2352
+ "type": "integer",
2353
+ "description": "所属项目",
2354
+ "format": "int32"
2355
+ },
2356
+ "execution": {
2357
+ "type": "integer",
2358
+ "description": "所属执行",
2359
+ "format": "int32"
2360
+ },
2361
+ "story": {
2362
+ "type": "integer",
2363
+ "description": "相关需求",
2364
+ "format": "int32"
2365
+ }
2366
+ }
2367
+ },
2368
+ },
2369
+ }, {
2370
+ name: 'delete',
2371
+ display: '删除Bug',
2372
+ type: 'delete',
2373
+ method: 'delete',
2374
+ path: '/bugs/{bugID}',
2375
+ resultType: 'text',
2376
+ pathParams: {
2377
+ bugID: 'Bug ID',
2378
+ },
2379
+ render: 'action',
2380
+ }, {
2381
+ name: 'activate',
2382
+ display: '激活Bug',
2383
+ type: 'action',
2384
+ method: 'put',
2385
+ path: '/bugs/{bugID}/activate',
2386
+ resultType: 'text',
2387
+ pathParams: {
2388
+ bugID: 'Bug ID',
2389
+ },
2390
+ requestBody: {
2391
+ required: true,
2392
+ type: 'object',
2393
+ schema: {
2394
+ "type": "object",
2395
+ "properties": {
2396
+ "openedBuild": {
2397
+ "type": "array",
2398
+ "items": {
2399
+ "type": "string"
2400
+ },
2401
+ "description": "影响版本, trunk为主干"
2402
+ },
2403
+ "assignedTo": {
2404
+ "type": "string",
2405
+ "description": "指派给"
2406
+ },
2407
+ "comment": {
2408
+ "type": "string",
2409
+ "description": "备注"
2410
+ }
2411
+ }
2412
+ },
2413
+ },
2414
+ render: 'action',
2415
+ }, {
2416
+ name: 'close',
2417
+ display: '关闭Bug',
2418
+ type: 'action',
2419
+ method: 'put',
2420
+ path: '/bugs/{bugID}/close',
2421
+ resultType: 'text',
2422
+ pathParams: {
2423
+ bugID: 'Bug ID',
2424
+ },
2425
+ requestBody: {
2426
+ required: true,
2427
+ type: 'object',
2428
+ schema: {
2429
+ "type": "object",
2430
+ "properties": {
2431
+ "comment": {
2432
+ "type": "string",
2433
+ "description": "备注"
2434
+ }
2435
+ }
2436
+ },
2437
+ },
2438
+ render: 'action',
2439
+ }, {
2440
+ name: 'resolve',
2441
+ display: '解决Bug',
2442
+ type: 'action',
2443
+ method: 'put',
2444
+ path: '/bugs/{bugID}/resolve',
2445
+ resultType: 'text',
2446
+ pathParams: {
2447
+ bugID: 'Bug ID',
2448
+ },
2449
+ requestBody: {
2450
+ required: true,
2451
+ type: 'object',
2452
+ schema: {
2453
+ "type": "object",
2454
+ "properties": {
2455
+ "resolution": {
2456
+ "type": "string",
2457
+ "description": "fixed 已解决 | notrepro 无法重现 | bydesign 设计如此 | duplicate 重复Bug | external 外部原因| postponed 延期处理 | willnotfix 不予解决 | tostory 转为需求"
2458
+ },
2459
+ "resolvedDate": {
2460
+ "type": "string",
2461
+ "description": "解决日期,默认今天"
2462
+ },
2463
+ "resolvedBuild": {
2464
+ "type": "string",
2465
+ "description": "解决版本, trunk为主干"
2466
+ },
2467
+ "assignedTo": {
2468
+ "type": "string",
2469
+ "description": "指派给"
2470
+ },
2471
+ "comment": {
2472
+ "type": "string",
2473
+ "description": "备注"
2474
+ }
2475
+ },
2476
+ "required": [
2477
+ "resolution"
2478
+ ]
2479
+ },
2480
+ },
2481
+ render: 'action',
2482
+ }
2483
+ ],
2484
+ },
2485
+ /* 测试用例模块 */
2486
+ {
2487
+ name: 'testcase',
2488
+ display: '测试用例',
2489
+ description: '测试用例管理,支持获取测试用例列表,支持获取产品/项目/执行下的测试用例、创建测试用例、获取测试用例详情、修改测试用例、删除测试用例',
2490
+ actions: [
2491
+ {
2492
+ name: 'list',
2493
+ display: '获取测试用例列表,支持获取产品/项目/执行下的测试用例',
2494
+ type: 'list',
2495
+ method: 'get',
2496
+ path: '/{scope}/{scopeID}/testcases',
2497
+ resultType: 'list',
2498
+ pagerGetter: 'pager',
2499
+ resultGetter: 'testcases',
2500
+ pathParams: {
2501
+ scope: { description: '测试用例范围', options: [{ value: 'products', label: '产品' }, { value: 'projects', label: '项目' }, { value: 'executions', label: '执行' }] },
2502
+ scopeID: '范围ID',
2503
+ },
2504
+ params: [
2505
+ {
2506
+ name: 'browseType',
2507
+ required: false,
2508
+ type: 'string',
2509
+ description: '状态,默认是all',
2510
+ defaultValue: 'all',
2511
+ options: [
2512
+ { value: 'all', label: '全部' },
2513
+ { value: 'wait', label: '未关闭' },
2514
+ { value: 'needconfirm', label: '需求变动' },
2515
+ ],
2516
+ },
2517
+ {
2518
+ name: 'orderBy',
2519
+ required: false,
2520
+ type: 'string',
2521
+ description: '排序',
2522
+ options: [
2523
+ { value: 'id_asc', label: 'ID 升序' },
2524
+ { value: 'id_desc', label: 'ID 降序' },
2525
+ { value: 'title_asc', label: '标题 升序' },
2526
+ { value: 'title_desc', label: '标题 降序' },
2527
+ { value: 'status_asc', label: '状态 升序' },
2528
+ { value: 'status_desc', label: '状态 降序' },
2529
+ ],
2530
+ },
2531
+ {
2532
+ name: 'recPerPage',
2533
+ required: false,
2534
+ type: 'number',
2535
+ description: '每页数量,不超过1000',
2536
+ },
2537
+ {
2538
+ name: 'pageID',
2539
+ required: false,
2540
+ type: 'number',
2541
+ description: '页码,从第1页开始',
2542
+ },
2543
+ ],
2544
+ }, {
2545
+ name: 'create',
2546
+ display: '创建测试用例',
2547
+ type: 'create',
2548
+ method: 'post',
2549
+ path: '/testcases',
2550
+ resultType: 'object',
2551
+ requestBody: {
2552
+ required: true,
2553
+ type: 'object',
2554
+ schema: {
2555
+ "type": "object",
2556
+ "properties": {
2557
+ "productID": {
2558
+ "type": "integer",
2559
+ "description": "所属产品",
2560
+ "format": "int32"
2561
+ },
2562
+ "title": {
2563
+ "type": "string",
2564
+ "description": "用例标题"
2565
+ },
2566
+ "module": {
2567
+ "type": "integer",
2568
+ "description": "所属模块",
2569
+ "format": "int32"
2570
+ },
2571
+ "story": {
2572
+ "type": "integer",
2573
+ "description": "相关需求",
2574
+ "format": "int32"
2575
+ },
2576
+ "pri": {
2577
+ "type": "integer",
2578
+ "description": "优先级",
2579
+ "format": "int32"
2580
+ },
2581
+ "type": {
2582
+ "type": "string",
2583
+ "description": "用例类型(unit 单元测试 | interface 接口测试 | feature 功能测试 | install 安装部署 | config 配置相关 | performance 性能测试 | security 安全相关 | other 其他)"
2584
+ },
2585
+ "precondition": {
2586
+ "type": "string",
2587
+ "description": "前置条件"
2588
+ },
2589
+ "steps": {
2590
+ "type": "array",
2591
+ "items": {
2592
+ "type": "string"
2593
+ },
2594
+ "description": "用例步骤"
2595
+ },
2596
+ "expects": {
2597
+ "type": "array",
2598
+ "items": {
2599
+ "type": "string"
2600
+ },
2601
+ "description": "用例步骤期望"
2602
+ },
2603
+ "stepType": {
2604
+ "type": "array",
2605
+ "items": {
2606
+ "type": "string"
2607
+ },
2608
+ "description": "用例步骤类型(step 步骤 | group 父级步骤)"
2609
+ },
2610
+ "project": {
2611
+ "type": "integer",
2612
+ "description": "所属项目",
2613
+ "format": "int32"
2614
+ },
2615
+ "execution": {
2616
+ "type": "integer",
2617
+ "description": "所属执行",
2618
+ "format": "int32"
2619
+ }
2620
+ },
2621
+ "required": [
2622
+ "productID",
2623
+ "title"
2624
+ ]
2625
+ },
2626
+ },
2627
+ }, {
2628
+ name: 'get',
2629
+ display: '获取测试用例详情',
2630
+ type: 'get',
2631
+ method: 'get',
2632
+ path: '/testcases/{caseID}',
2633
+ resultType: 'object',
2634
+ resultGetter: 'testcase',
2635
+ pathParams: {
2636
+ caseID: '测试用例ID',
2637
+ },
2638
+ }, {
2639
+ name: 'update',
2640
+ display: '修改测试用例',
2641
+ type: 'update',
2642
+ method: 'put',
2643
+ path: '/testcases/{testcasID}',
2644
+ resultType: 'object',
2645
+ pathParams: {
2646
+ testcasID: '测试用例ID',
2647
+ },
2648
+ requestBody: {
2649
+ required: true,
2650
+ type: 'object',
2651
+ schema: {
2652
+ "type": "object",
2653
+ "properties": {
2654
+ "title": {
2655
+ "type": "string",
2656
+ "description": "用例标题"
2657
+ },
2658
+ "moudule": {
2659
+ "type": "integer",
2660
+ "description": "所属模块",
2661
+ "format": "int32"
2662
+ },
2663
+ "story": {
2664
+ "type": "integer",
2665
+ "description": "相关需求",
2666
+ "format": "int32"
2667
+ },
2668
+ "pri": {
2669
+ "type": "integer",
2670
+ "description": "优先级",
2671
+ "format": "int32"
2672
+ },
2673
+ "type": {
2674
+ "type": "string",
2675
+ "description": "用例类型(unit 单元测试 | interface 接口测试 | feature 功能测试 | install 安装部署 | config 配置相关 | performance 性能测试 | security 安全相关 | other 其他)"
2676
+ },
2677
+ "precondition": {
2678
+ "type": "string",
2679
+ "description": "前置条件"
2680
+ },
2681
+ "steps": {
2682
+ "type": "array",
2683
+ "items": {
2684
+ "type": "string"
2685
+ },
2686
+ "description": "用例步骤"
2687
+ },
2688
+ "expects": {
2689
+ "type": "array",
2690
+ "items": {
2691
+ "type": "string"
2692
+ },
2693
+ "description": "用例步骤期望"
2694
+ },
2695
+ "stepType": {
2696
+ "type": "array",
2697
+ "items": {
2698
+ "type": "string"
2699
+ },
2700
+ "description": "用例步骤类型(step 步骤 | group 父级步骤)"
2701
+ }
2702
+ },
2703
+ "required": [
2704
+ "title"
2705
+ ]
2706
+ },
2707
+ },
2708
+ }, {
2709
+ name: 'delete',
2710
+ display: '删除测试用例',
2711
+ type: 'delete',
2712
+ method: 'delete',
2713
+ path: '/testcases/{testcasID}',
2714
+ resultType: 'text',
2715
+ pathParams: {
2716
+ testcasID: '测试用例ID',
2717
+ },
2718
+ render: 'action',
2719
+ }
2720
+ ],
2721
+ },
2722
+ /* 任务模块 */
2723
+ {
2724
+ name: 'task',
2725
+ display: '任务',
2726
+ description: '任务管理,支持获取任务列表,支持获取执行下的任务、创建任务、获取任务详情、修改任务、删除任务、激活任务、关闭任务、完成任务、启动任务',
2727
+ actions: [
2728
+ {
2729
+ name: 'list',
2730
+ display: '获取任务列表,支持获取执行下的任务',
2731
+ type: 'list',
2732
+ method: 'get',
2733
+ path: '/{scope}/{scopeID}/tasks',
2734
+ resultType: 'list',
2735
+ pagerGetter: 'pager',
2736
+ resultGetter: 'tasks',
2737
+ pathParams: {
2738
+ scope: { description: '任务范围', options: [{ value: 'executions', label: '执行' }] },
2739
+ scopeID: '范围ID',
2740
+ },
2741
+ params: [
2742
+ {
2743
+ name: 'status',
2744
+ required: false,
2745
+ type: 'string',
2746
+ description: '状态,默认是unclosed',
2747
+ defaultValue: 'unclosed',
2748
+ options: [
2749
+ { value: 'all', label: '全部' },
2750
+ { value: 'unclosed', label: '未关闭' },
2751
+ { value: 'assignedtome', label: '指派给我' },
2752
+ { value: 'assignedtome', label: '指派给我' },
2753
+ { value: 'myinvolved', label: '由我参与' },
2754
+ { value: 'assignedbyme', label: '由我指派' },
2755
+ ],
2756
+ },
2757
+ {
2758
+ name: 'orderBy',
2759
+ required: false,
2760
+ type: 'string',
2761
+ description: '排序',
2762
+ options: [
2763
+ { value: 'id_asc', label: 'ID 升序' },
2764
+ { value: 'id_desc', label: 'ID 降序' },
2765
+ { value: 'name_asc', label: '名称 升序' },
2766
+ { value: 'name_desc', label: '名称 降序' },
2767
+ { value: 'status_asc', label: '状态 升序' },
2768
+ { value: 'status_desc', label: '状态 降序' },
2769
+ ],
2770
+ },
2771
+ {
2772
+ name: 'recPerPage',
2773
+ required: false,
2774
+ type: 'number',
2775
+ description: '每页数量,不超过1000',
2776
+ },
2777
+ {
2778
+ name: 'pageID',
2779
+ required: false,
2780
+ type: 'number',
2781
+ description: '页码,从第1页开始',
2782
+ },
2783
+ ],
2784
+ }, {
2785
+ name: 'create',
2786
+ display: '创建任务',
2787
+ type: 'create',
2788
+ method: 'post',
2789
+ path: '/tasks',
2790
+ resultType: 'object',
2791
+ requestBody: {
2792
+ required: true,
2793
+ type: 'object',
2794
+ schema: {
2795
+ "type": "object",
2796
+ "properties": {
2797
+ "name": {
2798
+ "type": "string",
2799
+ "description": "任务名称"
2800
+ },
2801
+ "executionID": {
2802
+ "type": "integer",
2803
+ "description": "所属执行",
2804
+ "format": "int32"
2805
+ },
2806
+ "type": {
2807
+ "type": "string",
2808
+ "description": "任务类型"
2809
+ },
2810
+ "assignedTo": {
2811
+ "type": "string",
2812
+ "description": "指派给"
2813
+ },
2814
+ "estStarted": {
2815
+ "type": "string",
2816
+ "description": "预计开始"
2817
+ },
2818
+ "deadline": {
2819
+ "type": "string",
2820
+ "description": "截止日期"
2821
+ },
2822
+ "pri": {
2823
+ "type": "integer",
2824
+ "description": "优先级",
2825
+ "format": "int32"
2826
+ },
2827
+ "estimate": {
2828
+ "type": "number",
2829
+ "description": "预计工时",
2830
+ "format": "float"
2831
+ },
2832
+ "module": {
2833
+ "type": "integer",
2834
+ "description": "所属模块",
2835
+ "format": "int32"
2836
+ },
2837
+ "story": {
2838
+ "type": "integer",
2839
+ "description": "相关需求",
2840
+ "format": "int32"
2841
+ },
2842
+ "desc": {
2843
+ "type": "string",
2844
+ "description": "任务描述"
2845
+ }
2846
+ },
2847
+ "required": [
2848
+ "name",
2849
+ "executionID"
2850
+ ]
2851
+ },
2852
+ },
2853
+ }, {
2854
+ name: 'get',
2855
+ display: '获取任务详情',
2856
+ type: 'get',
2857
+ method: 'get',
2858
+ path: '/tasks/{taskID}',
2859
+ resultType: 'object',
2860
+ pathParams: {
2861
+ taskID: '任务ID',
2862
+ },
2863
+ }, {
2864
+ name: 'update',
2865
+ display: '修改任务',
2866
+ type: 'update',
2867
+ method: 'put',
2868
+ path: '/tasks/{taskID}',
2869
+ resultType: 'object',
2870
+ pathParams: {
2871
+ taskID: '任务ID',
2872
+ },
2873
+ requestBody: {
2874
+ required: true,
2875
+ type: 'object',
2876
+ schema: {
2877
+ "type": "object",
2878
+ "properties": {
2879
+ "name": {
2880
+ "type": "string",
2881
+ "description": "任务名称"
2882
+ },
2883
+ "type": {
2884
+ "type": "string",
2885
+ "description": "任务类型"
2886
+ },
2887
+ "assignedTo": {
2888
+ "type": "string",
2889
+ "description": "指派给"
2890
+ },
2891
+ "estStarted": {
2892
+ "type": "string",
2893
+ "description": "预计开始"
2894
+ },
2895
+ "deadline": {
2896
+ "type": "string",
2897
+ "description": "截止日期"
2898
+ },
2899
+ "pri": {
2900
+ "type": "integer",
2901
+ "description": "优先级",
2902
+ "format": "int32"
2903
+ },
2904
+ "estimate": {
2905
+ "type": "number",
2906
+ "description": "预计工时",
2907
+ "format": "float"
2908
+ },
2909
+ "module": {
2910
+ "type": "integer",
2911
+ "description": "所属模块",
2912
+ "format": "int32"
2913
+ },
2914
+ "story": {
2915
+ "type": "integer",
2916
+ "description": "相关需求",
2917
+ "format": "int32"
2918
+ },
2919
+ "desc": {
2920
+ "type": "string",
2921
+ "description": "任务描述"
2922
+ }
2923
+ }
2924
+ },
2925
+ },
2926
+ }, {
2927
+ name: 'delete',
2928
+ display: '删除任务',
2929
+ type: 'delete',
2930
+ method: 'delete',
2931
+ path: '/tasks/{taskID}',
2932
+ resultType: 'text',
2933
+ pathParams: {
2934
+ taskID: '任务ID',
2935
+ },
2936
+ render: 'action',
2937
+ }, {
2938
+ name: 'activate',
2939
+ display: '激活任务',
2940
+ type: 'action',
2941
+ method: 'put',
2942
+ path: '/tasks/{taskID}/activate',
2943
+ resultType: 'text',
2944
+ pathParams: {
2945
+ taskID: '任务ID',
2946
+ },
2947
+ requestBody: {
2948
+ required: true,
2949
+ type: 'object',
2950
+ schema: {
2951
+ "type": "object",
2952
+ "properties": {
2953
+ "left": {
2954
+ "type": "number",
2955
+ "description": "预计剩余",
2956
+ "format": "float"
2957
+ },
2958
+ "assignedTo": {
2959
+ "type": "string",
2960
+ "description": "指派给"
2961
+ },
2962
+ "comment": {
2963
+ "type": "string",
2964
+ "description": "备注"
2965
+ }
2966
+ }
2967
+ },
2968
+ },
2969
+ render: 'action',
2970
+ }, {
2971
+ name: 'close',
2972
+ display: '关闭任务',
2973
+ type: 'action',
2974
+ method: 'put',
2975
+ path: '/tasks/{taskID}/close',
2976
+ resultType: 'text',
2977
+ pathParams: {
2978
+ taskID: '任务ID',
2979
+ },
2980
+ requestBody: {
2981
+ required: true,
2982
+ type: 'object',
2983
+ schema: {
2984
+ "type": "object",
2985
+ "properties": {
2986
+ "comment": {
2987
+ "type": "string",
2988
+ "description": "备注"
2989
+ }
2990
+ }
2991
+ },
2992
+ },
2993
+ render: 'action',
2994
+ }, {
2995
+ name: 'finish',
2996
+ display: '完成任务',
2997
+ type: 'action',
2998
+ method: 'put',
2999
+ path: '/tasks/{taskID}/finish',
3000
+ resultType: 'text',
3001
+ pathParams: {
3002
+ taskID: '任务ID',
3003
+ },
3004
+ requestBody: {
3005
+ required: true,
3006
+ type: 'object',
3007
+ schema: {
3008
+ "type": "object",
3009
+ "properties": {
3010
+ "currentConsumed": {
3011
+ "type": "number",
3012
+ "description": "本次消耗",
3013
+ "format": "float"
3014
+ },
3015
+ "assignedTo": {
3016
+ "type": "string",
3017
+ "description": "任务名称"
3018
+ },
3019
+ "consumed": {
3020
+ "type": "number",
3021
+ "description": "总计消耗",
3022
+ "format": "float"
3023
+ },
3024
+ "realStarted": {
3025
+ "type": "string",
3026
+ "description": "实际开始"
3027
+ },
3028
+ "finishedDate": {
3029
+ "type": "string",
3030
+ "description": "实际完成"
3031
+ },
3032
+ "comment": {
3033
+ "type": "string",
3034
+ "description": "备注"
3035
+ }
3036
+ },
3037
+ "required": [
3038
+ "currentConsumed",
3039
+ "realStarted",
3040
+ "finishedDate"
3041
+ ]
3042
+ },
3043
+ },
3044
+ render: 'action',
3045
+ }, {
3046
+ name: 'start',
3047
+ display: '启动任务',
3048
+ type: 'action',
3049
+ method: 'put',
3050
+ path: '/tasks/{taskID}/start',
3051
+ resultType: 'text',
3052
+ pathParams: {
3053
+ taskID: '任务ID',
3054
+ },
3055
+ requestBody: {
3056
+ required: true,
3057
+ type: 'object',
3058
+ schema: {
3059
+ "type": "object",
3060
+ "properties": {
3061
+ "assignedTo": {
3062
+ "type": "string",
3063
+ "description": "任务名称"
3064
+ },
3065
+ "realStarted": {
3066
+ "type": "string",
3067
+ "description": "实际开始"
3068
+ },
3069
+ "consumed": {
3070
+ "type": "number",
3071
+ "description": "总计消耗",
3072
+ "format": "float"
3073
+ },
3074
+ "left": {
3075
+ "type": "number",
3076
+ "description": "预计剩余",
3077
+ "format": "float"
3078
+ },
3079
+ "comment": {
3080
+ "type": "string",
3081
+ "description": "备注"
3082
+ }
3083
+ },
3084
+ "required": [
3085
+ "realStarted"
3086
+ ]
3087
+ },
3088
+ },
3089
+ render: 'action',
3090
+ }
3091
+ ],
3092
+ },
3093
+ /* 反馈模块 */
3094
+ {
3095
+ name: 'feedback',
3096
+ display: '反馈',
3097
+ description: '反馈管理,支持获取反馈列表,支持获取产品下的反馈、创建反馈、获取反馈详情、修改反馈、删除反馈、激活反馈、关闭反馈',
3098
+ actions: [
3099
+ {
3100
+ name: 'list',
3101
+ display: '获取反馈列表,支持获取产品下的反馈',
3102
+ type: 'list',
3103
+ method: 'get',
3104
+ path: '/{scope}/{scopeID}/feedbacks',
3105
+ resultType: 'list',
3106
+ pagerGetter: 'pager',
3107
+ resultGetter: 'feedbacks',
3108
+ pathParams: {
3109
+ scope: { description: '反馈范围', options: [{ value: 'products', label: '产品' }] },
3110
+ scopeID: '范围ID',
3111
+ },
3112
+ params: [
3113
+ {
3114
+ name: 'browseType',
3115
+ required: false,
3116
+ type: 'string',
3117
+ description: '状态,默认是wait',
3118
+ defaultValue: 'wait',
3119
+ options: [
3120
+ { value: 'all', label: '全部' },
3121
+ { value: 'wait', label: '待处理' },
3122
+ { value: 'doing', label: '处理中' },
3123
+ { value: 'toclosed', label: '待关闭' },
3124
+ { value: 'review', label: '待评审' },
3125
+ { value: 'assigntome', label: '指派给我' },
3126
+ { value: 'openedbyme', label: '由我反馈' },
3127
+ ],
3128
+ },
3129
+ {
3130
+ name: 'orderBy',
3131
+ required: false,
3132
+ type: 'string',
3133
+ description: '排序',
3134
+ options: [
3135
+ { value: 'id_asc', label: 'ID 升序' },
3136
+ { value: 'id_desc', label: 'ID 降序' },
3137
+ { value: 'title_asc', label: '标题 升序' },
3138
+ { value: 'title_desc', label: '标题 降序' },
3139
+ { value: 'status_asc', label: '状态 升序' },
3140
+ { value: 'status_desc', label: '状态 降序' },
3141
+ ],
3142
+ },
3143
+ {
3144
+ name: 'recPerPage',
3145
+ required: false,
3146
+ type: 'number',
3147
+ description: '每页数量,不超过1000',
3148
+ },
3149
+ {
3150
+ name: 'pageID',
3151
+ required: false,
3152
+ type: 'number',
3153
+ description: '页码,从第1页开始',
3154
+ },
3155
+ ],
3156
+ }, {
3157
+ name: 'create',
3158
+ display: '创建反馈',
3159
+ type: 'create',
3160
+ method: 'post',
3161
+ path: '/feedbacks',
3162
+ resultType: 'object',
3163
+ requestBody: {
3164
+ required: true,
3165
+ type: 'object',
3166
+ schema: {
3167
+ "type": "object",
3168
+ "properties": {
3169
+ "product": {
3170
+ "type": "integer",
3171
+ "description": "所属产品",
3172
+ "format": "int32"
3173
+ },
3174
+ "title": {
3175
+ "type": "string",
3176
+ "description": "标题"
3177
+ },
3178
+ "module": {
3179
+ "type": "integer",
3180
+ "description": "所属模块",
3181
+ "format": "int32"
3182
+ },
3183
+ "type": {
3184
+ "type": "string",
3185
+ "description": "类型(story 需求 | task 任务 | bug Bug | todo 待办 | advice 建议 | issue 问题 | risk 风险 | opportunity 机会)"
3186
+ },
3187
+ "desc": {
3188
+ "type": "string",
3189
+ "description": "描述"
3190
+ },
3191
+ "feedbackBy": {
3192
+ "type": "string",
3193
+ "description": "反馈者"
3194
+ },
3195
+ "source": {
3196
+ "type": "string",
3197
+ "description": "来源"
3198
+ }
3199
+ },
3200
+ "required": [
3201
+ "product",
3202
+ "title"
3203
+ ]
3204
+ },
3205
+ },
3206
+ }, {
3207
+ name: 'get',
3208
+ display: '获取反馈详情',
3209
+ type: 'get',
3210
+ method: 'get',
3211
+ path: '/feedbacks/{feedbackID}',
3212
+ resultType: 'object',
3213
+ resultGetter: 'feedback',
3214
+ pathParams: {
3215
+ feedbackID: '反馈ID',
3216
+ },
3217
+ }, {
3218
+ name: 'update',
3219
+ display: '修改反馈',
3220
+ type: 'update',
3221
+ method: 'put',
3222
+ path: '/feedbacks/{feedbackID}',
3223
+ resultType: 'object',
3224
+ pathParams: {
3225
+ feedbackID: '反馈ID',
3226
+ },
3227
+ requestBody: {
3228
+ required: true,
3229
+ type: 'object',
3230
+ schema: {
3231
+ "type": "object",
3232
+ "properties": {
3233
+ "product": {
3234
+ "type": "integer",
3235
+ "description": "所属产品",
3236
+ "format": "int32"
3237
+ },
3238
+ "module": {
3239
+ "type": "integer",
3240
+ "description": "所属模块",
3241
+ "format": "int32"
3242
+ },
3243
+ "title": {
3244
+ "type": "string",
3245
+ "description": "标题"
3246
+ },
3247
+ "type": {
3248
+ "type": "string",
3249
+ "description": "类型(story 需求 | task 任务 | bug Bug | todo 待办 | advice 建议 | issue 问题 | risk 风险 | opportunity 机会)"
3250
+ },
3251
+ "desc": {
3252
+ "type": "string",
3253
+ "description": "描述"
3254
+ },
3255
+ "feedbackBy": {
3256
+ "type": "string",
3257
+ "description": "反馈者"
3258
+ },
3259
+ "source": {
3260
+ "type": "string",
3261
+ "description": "来源"
3262
+ }
3263
+ },
3264
+ "required": [
3265
+ "product",
3266
+ "title"
3267
+ ]
3268
+ },
3269
+ },
3270
+ }, {
3271
+ name: 'delete',
3272
+ display: '删除反馈',
3273
+ type: 'delete',
3274
+ method: 'delete',
3275
+ path: '/feedbacks/{feedbackID}',
3276
+ resultType: 'text',
3277
+ pathParams: {
3278
+ feedbackID: '反馈ID',
3279
+ },
3280
+ render: 'action',
3281
+ }, {
3282
+ name: 'activate',
3283
+ display: '激活反馈',
3284
+ type: 'action',
3285
+ method: 'put',
3286
+ path: '/feedbacks/{feedbackID}/activate',
3287
+ resultType: 'text',
3288
+ pathParams: {
3289
+ feedbackID: '反馈ID',
3290
+ },
3291
+ requestBody: {
3292
+ required: true,
3293
+ type: 'object',
3294
+ schema: {
3295
+ "type": "object",
3296
+ "properties": {
3297
+ "assignedTo": {
3298
+ "type": "string",
3299
+ "description": "指派给"
3300
+ },
3301
+ "comment": {
3302
+ "type": "string",
3303
+ "description": "备注"
3304
+ }
3305
+ }
3306
+ },
3307
+ },
3308
+ render: 'action',
3309
+ }, {
3310
+ name: 'close',
3311
+ display: '关闭反馈',
3312
+ type: 'action',
3313
+ method: 'put',
3314
+ path: '/feedbacks/{feedbackID}/close',
3315
+ resultType: 'text',
3316
+ pathParams: {
3317
+ feedbackID: '反馈ID',
3318
+ },
3319
+ requestBody: {
3320
+ required: true,
3321
+ type: 'object',
3322
+ schema: {
3323
+ "type": "object",
3324
+ "properties": {
3325
+ "closedReason": {
3326
+ "type": "string",
3327
+ "description": "关闭原因(commented 已处理 | repeat 重复 | refuse 不予采纳)"
3328
+ },
3329
+ "comment": {
3330
+ "type": "string",
3331
+ "description": "备注"
3332
+ }
3333
+ },
3334
+ "required": [
3335
+ "closedReason"
3336
+ ]
3337
+ },
3338
+ },
3339
+ render: 'action',
3340
+ }
3341
+ ],
3342
+ },
3343
+ /* 工单模块 */
3344
+ {
3345
+ name: 'ticket',
3346
+ display: '工单',
3347
+ description: '工单管理,支持获取工单列表,支持获取产品下的工单、创建工单、获取工单详情、修改工单、删除工单、激活工单、关闭工单',
3348
+ actions: [
3349
+ {
3350
+ name: 'list',
3351
+ display: '获取工单列表,支持获取产品下的工单',
3352
+ type: 'list',
3353
+ method: 'get',
3354
+ path: '/{scope}/{scopeID}/tickets',
3355
+ resultType: 'list',
3356
+ pagerGetter: 'pager',
3357
+ resultGetter: 'tickets',
3358
+ pathParams: {
3359
+ scope: { description: '工单范围', options: [{ value: 'products', label: '产品' }] },
3360
+ scopeID: '范围ID',
3361
+ },
3362
+ params: [
3363
+ {
3364
+ name: 'browseType',
3365
+ required: false,
3366
+ type: 'string',
3367
+ description: '状态,默认是wait',
3368
+ defaultValue: 'wait',
3369
+ options: [
3370
+ { value: 'all', label: '全部' },
3371
+ { value: 'unclosed', label: '未关闭' },
3372
+ { value: 'wait', label: '待处理' },
3373
+ { value: 'doing', label: '处理中' },
3374
+ { value: 'done', label: '待关闭' },
3375
+ { value: 'finishedbyme', label: '由我解决' },
3376
+ { value: 'assigntome', label: '指派给我' },
3377
+ { value: 'openedbyme', label: '由我创建' },
3378
+ ],
3379
+ },
3380
+ {
3381
+ name: 'orderBy',
3382
+ required: false,
3383
+ type: 'string',
3384
+ description: '排序',
3385
+ options: [
3386
+ { value: 'id_asc', label: 'ID 升序' },
3387
+ { value: 'id_desc', label: 'ID 降序' },
3388
+ { value: 'title_asc', label: '标题 升序' },
3389
+ { value: 'title_desc', label: '标题 降序' },
3390
+ { value: 'status_asc', label: '状态 升序' },
3391
+ { value: 'status_desc', label: '状态 降序' },
3392
+ ],
3393
+ },
3394
+ {
3395
+ name: 'recPerPage',
3396
+ required: false,
3397
+ type: 'number',
3398
+ description: '每页数量,不超过1000',
3399
+ },
3400
+ {
3401
+ name: 'pageID',
3402
+ required: false,
3403
+ type: 'number',
3404
+ description: '页码,从第1页开始',
3405
+ },
3406
+ ],
3407
+ }, {
3408
+ name: 'create',
3409
+ display: '创建工单',
3410
+ type: 'create',
3411
+ method: 'post',
3412
+ path: '/tickets',
3413
+ resultType: 'object',
3414
+ requestBody: {
3415
+ required: true,
3416
+ type: 'object',
3417
+ schema: {
3418
+ "type": "object",
3419
+ "properties": {
3420
+ "product": {
3421
+ "type": "integer",
3422
+ "description": "所属产品",
3423
+ "format": "int32"
3424
+ },
3425
+ "module": {
3426
+ "type": "integer",
3427
+ "description": "所属模块",
3428
+ "format": "int32"
3429
+ },
3430
+ "title": {
3431
+ "type": "string",
3432
+ "description": "标题"
3433
+ },
3434
+ "type": {
3435
+ "type": "string",
3436
+ "description": "类型(code 程序报错 | data 数据错误 | stuck 流程卡断 | security 安全问题 | affair 事务)"
3437
+ },
3438
+ "desc": {
3439
+ "type": "string",
3440
+ "description": "描述"
3441
+ },
3442
+ "assignedTo": {
3443
+ "type": "string",
3444
+ "description": "指派给"
3445
+ },
3446
+ "deadline": {
3447
+ "type": "string",
3448
+ "description": "截止日期"
3449
+ },
3450
+ "openedBuild": {
3451
+ "type": "array",
3452
+ "items": {
3453
+ "type": "string"
3454
+ },
3455
+ "description": "影响版本"
3456
+ }
3457
+ },
3458
+ "required": [
3459
+ "product",
3460
+ "title"
3461
+ ]
3462
+ },
3463
+ },
3464
+ }, {
3465
+ name: 'get',
3466
+ display: '获取工单详情',
3467
+ type: 'get',
3468
+ method: 'get',
3469
+ path: '/tickets/{ticketID}',
3470
+ resultType: 'object',
3471
+ resultGetter: 'ticket',
3472
+ pathParams: {
3473
+ ticketID: '工单ID',
3474
+ },
3475
+ }, {
3476
+ name: 'update',
3477
+ display: '修改工单',
3478
+ type: 'update',
3479
+ method: 'put',
3480
+ path: '/tickets/{ticketID}',
3481
+ resultType: 'object',
3482
+ pathParams: {
3483
+ ticketID: '工单ID',
3484
+ },
3485
+ requestBody: {
3486
+ required: true,
3487
+ type: 'object',
3488
+ schema: {
3489
+ "type": "object",
3490
+ "properties": {
3491
+ "product": {
3492
+ "type": "integer",
3493
+ "description": "所属产品",
3494
+ "format": "int32"
3495
+ },
3496
+ "module": {
3497
+ "type": "integer",
3498
+ "description": "所属模块",
3499
+ "format": "int32"
3500
+ },
3501
+ "title": {
3502
+ "type": "string",
3503
+ "description": "标题"
3504
+ },
3505
+ "type": {
3506
+ "type": "string",
3507
+ "description": "类型(code 程序报错 | data 数据错误 | stuck 流程卡断 | security 安全问题 | affair 事务)"
3508
+ },
3509
+ "desc": {
3510
+ "type": "string",
3511
+ "description": "描述"
3512
+ },
3513
+ "assignedTo": {
3514
+ "type": "string",
3515
+ "description": "指派给"
3516
+ },
3517
+ "deadline": {
3518
+ "type": "string",
3519
+ "description": "截止日期"
3520
+ },
3521
+ "openedBuild": {
3522
+ "type": "array",
3523
+ "items": {
3524
+ "type": "string"
3525
+ },
3526
+ "description": "影响版本"
3527
+ }
3528
+ }
3529
+ },
3530
+ },
3531
+ }, {
3532
+ name: 'delete',
3533
+ display: '删除工单',
3534
+ type: 'delete',
3535
+ method: 'delete',
3536
+ path: '/tickets/{ticketID}',
3537
+ resultType: 'text',
3538
+ pathParams: {
3539
+ ticketID: '工单ID',
3540
+ },
3541
+ render: 'action',
3542
+ }, {
3543
+ name: 'activate',
3544
+ display: '激活工单',
3545
+ type: 'action',
3546
+ method: 'put',
3547
+ path: '/tickets/{ticketID}/activate',
3548
+ resultType: 'text',
3549
+ pathParams: {
3550
+ ticketID: '工单ID',
3551
+ },
3552
+ requestBody: {
3553
+ required: true,
3554
+ type: 'object',
3555
+ schema: {
3556
+ "type": "object",
3557
+ "properties": {
3558
+ "assignedTo": {
3559
+ "type": "string",
3560
+ "description": "指派给"
3561
+ },
3562
+ "comment": {
3563
+ "type": "string",
3564
+ "description": "备注"
3565
+ }
3566
+ }
3567
+ },
3568
+ },
3569
+ render: 'action',
3570
+ }, {
3571
+ name: 'close',
3572
+ display: '关闭工单',
3573
+ type: 'action',
3574
+ method: 'put',
3575
+ path: '/tickets/{ticketID}/close',
3576
+ resultType: 'text',
3577
+ pathParams: {
3578
+ ticketID: '工单ID',
3579
+ },
3580
+ requestBody: {
3581
+ required: true,
3582
+ type: 'object',
3583
+ schema: {
3584
+ "type": "object",
3585
+ "properties": {
3586
+ "closedReason": {
3587
+ "type": "string",
3588
+ "description": "关闭原因(commented 已处理 | repeat 重复 | refuse 不予处理)"
3589
+ },
3590
+ "comment": {
3591
+ "type": "string",
3592
+ "description": "备注"
3593
+ }
3594
+ },
3595
+ "required": [
3596
+ "closedReason",
3597
+ "comment"
3598
+ ]
3599
+ },
3600
+ },
3601
+ render: 'action',
3602
+ }
3603
+ ],
3604
+ },
3605
+ /* 应用模块 */
3606
+ {
3607
+ name: 'system',
3608
+ display: '应用',
3609
+ description: '应用管理,支持获取应用列表,支持获取产品下的应用、创建应用、修改应用',
3610
+ actions: [
3611
+ {
3612
+ name: 'list',
3613
+ display: '获取应用列表,支持获取产品下的应用',
3614
+ type: 'list',
3615
+ method: 'get',
3616
+ path: '/{scope}/{scopeID}/systems',
3617
+ resultType: 'list',
3618
+ pagerGetter: 'pager',
3619
+ pathParams: {
3620
+ scope: { description: '应用范围', options: [{ value: 'products', label: '产品' }] },
3621
+ scopeID: '范围ID',
3622
+ },
3623
+ }, {
3624
+ name: 'create',
3625
+ display: '创建应用',
3626
+ type: 'create',
3627
+ method: 'post',
3628
+ path: '/systems',
3629
+ resultType: 'object',
3630
+ requestBody: {
3631
+ required: true,
3632
+ type: 'object',
3633
+ schema: {
3634
+ "type": "object",
3635
+ "properties": {
3636
+ "productID": {
3637
+ "type": "integer",
3638
+ "description": "所属产品",
3639
+ "format": "int32"
3640
+ },
3641
+ "integrated": {
3642
+ "type": "integer",
3643
+ "description": "是否集成应用(0 否| 1 是)",
3644
+ "format": "int32"
3645
+ },
3646
+ "children": {
3647
+ "type": "array",
3648
+ "items": {
3649
+ "type": "string"
3650
+ },
3651
+ "description": "集成应用需要包含其他应用,非集成应用传空数组[]"
3652
+ },
3653
+ "name": {
3654
+ "type": "string",
3655
+ "description": "应用名称"
3656
+ },
3657
+ "desc": {
3658
+ "type": "string",
3659
+ "description": "描述"
3660
+ }
3661
+ },
3662
+ "required": [
3663
+ "productID",
3664
+ "integrated",
3665
+ "children",
3666
+ "name"
3667
+ ]
3668
+ },
3669
+ },
3670
+ }, {
3671
+ name: 'update',
3672
+ display: '修改应用',
3673
+ type: 'update',
3674
+ method: 'put',
3675
+ path: '/systems/{systemID}',
3676
+ resultType: 'object',
3677
+ pathParams: {
3678
+ systemID: '应用ID',
3679
+ },
3680
+ requestBody: {
3681
+ required: true,
3682
+ type: 'object',
3683
+ schema: {
3684
+ "type": "object",
3685
+ "properties": {
3686
+ "name": {
3687
+ "type": "string",
3688
+ "description": "应用名称"
3689
+ },
3690
+ "children": {
3691
+ "type": "array",
3692
+ "items": {
3693
+ "type": "string"
3694
+ },
3695
+ "description": "集成应用需要包含其他应用,非集成应用传空数组[]"
3696
+ },
3697
+ "desc": {
3698
+ "type": "string",
3699
+ "description": "描述"
3700
+ }
3701
+ },
3702
+ "required": [
3703
+ "name",
3704
+ "children"
3705
+ ]
3706
+ },
3707
+ },
3708
+ }
3709
+ ],
3710
+ },
3711
+ /* 版本模块 */
3712
+ {
3713
+ name: 'build',
3714
+ display: '版本',
3715
+ description: '版本管理,支持获取版本列表,支持获取项目/执行下的版本、创建版本/构建、修改版本、删除版本',
3716
+ actions: [
3717
+ {
3718
+ name: 'list',
3719
+ display: '获取版本列表,支持获取项目/执行下的版本',
3720
+ type: 'list',
3721
+ method: 'get',
3722
+ path: '/{scope}/{scopeID}/builds',
3723
+ resultType: 'list',
3724
+ pagerGetter: 'pager',
3725
+ resultGetter: 'builds',
3726
+ pathParams: {
3727
+ scope: { description: '版本范围', options: [{ value: 'projects', label: '项目' }, { value: 'executions', label: '执行' }] },
3728
+ scopeID: '范围ID',
3729
+ },
3730
+ }, {
3731
+ name: 'create',
3732
+ display: '创建版本/构建',
3733
+ type: 'create',
3734
+ method: 'post',
3735
+ path: '/builds',
3736
+ resultType: 'object',
3737
+ requestBody: {
3738
+ required: true,
3739
+ type: 'object',
3740
+ schema: {
3741
+ "type": "object",
3742
+ "properties": {
3743
+ "executionID": {
3744
+ "type": "integer",
3745
+ "description": "所属执行/迭代",
3746
+ "format": "int32"
3747
+ },
3748
+ "product": {
3749
+ "type": "integer",
3750
+ "description": "所属产品",
3751
+ "format": "int32"
3752
+ },
3753
+ "name": {
3754
+ "type": "string",
3755
+ "description": "构建名称"
3756
+ },
3757
+ "system": {
3758
+ "type": "integer",
3759
+ "description": "所属应用",
3760
+ "format": "int32"
3761
+ },
3762
+ "builder": {
3763
+ "type": "string",
3764
+ "description": "构建者"
3765
+ },
3766
+ "date": {
3767
+ "type": "string",
3768
+ "description": "打包日期"
3769
+ },
3770
+ "scmPath": {
3771
+ "type": "string",
3772
+ "description": "源代码地址"
3773
+ },
3774
+ "filePath": {
3775
+ "type": "string",
3776
+ "description": "下载地址"
3777
+ },
3778
+ "desc": {
3779
+ "type": "string",
3780
+ "description": "描述"
3781
+ }
3782
+ },
3783
+ "required": [
3784
+ "executionID",
3785
+ "product",
3786
+ "name",
3787
+ "system",
3788
+ "builder",
3789
+ "date"
3790
+ ]
3791
+ },
3792
+ },
3793
+ }, {
3794
+ name: 'update',
3795
+ display: '修改版本',
3796
+ type: 'update',
3797
+ method: 'put',
3798
+ path: '/builds/{buildID}',
3799
+ resultType: 'object',
3800
+ pathParams: {
3801
+ buildID: '版本ID',
3802
+ },
3803
+ requestBody: {
3804
+ required: true,
3805
+ type: 'object',
3806
+ schema: {
3807
+ "type": "object",
3808
+ "properties": {
3809
+ "execution": {
3810
+ "type": "integer",
3811
+ "description": "所属执行/迭代",
3812
+ "format": "int32"
3813
+ },
3814
+ "product": {
3815
+ "type": "integer",
3816
+ "description": "所属产品",
3817
+ "format": "int32"
3818
+ },
3819
+ "name": {
3820
+ "type": "string",
3821
+ "description": "构建名称"
3822
+ },
3823
+ "system": {
3824
+ "type": "integer",
3825
+ "description": "所属应用",
3826
+ "format": "int32"
3827
+ },
3828
+ "builder": {
3829
+ "type": "string",
3830
+ "description": "构建者"
3831
+ },
3832
+ "date": {
3833
+ "type": "string",
3834
+ "description": "打包日期"
3835
+ },
3836
+ "scmPath": {
3837
+ "type": "string",
3838
+ "description": "源代码地址"
3839
+ },
3840
+ "filePath": {
3841
+ "type": "string",
3842
+ "description": "下载地址"
3843
+ },
3844
+ "desc": {
3845
+ "type": "string",
3846
+ "description": "描述"
3847
+ }
3848
+ },
3849
+ "required": [
3850
+ "execution",
3851
+ "product",
3852
+ "name",
3853
+ "system",
3854
+ "builder",
3855
+ "date"
3856
+ ]
3857
+ },
3858
+ },
3859
+ }, {
3860
+ name: 'delete',
3861
+ display: '删除版本',
3862
+ type: 'delete',
3863
+ method: 'delete',
3864
+ path: '/builds/{buildID}',
3865
+ resultType: 'text',
3866
+ pathParams: {
3867
+ buildID: '版本ID',
3868
+ },
3869
+ render: 'action',
3870
+ }
3871
+ ],
3872
+ },
3873
+ /* 测试单模块 */
3874
+ {
3875
+ name: 'testtask',
3876
+ display: '测试单',
3877
+ description: '测试单管理,支持获取测试单列表,支持获取产品/项目/执行下的测试单、创建测试单、修改测试单、删除测试单',
3878
+ actions: [
3879
+ {
3880
+ name: 'list',
3881
+ display: '获取测试单列表,支持获取产品/项目/执行下的测试单',
3882
+ type: 'list',
3883
+ method: 'get',
3884
+ path: '/{scope}/{scopeID}/testtasks',
3885
+ resultType: 'list',
3886
+ pagerGetter: 'pager',
3887
+ resultGetter: 'testtasks',
3888
+ pathParams: {
3889
+ scope: { description: '测试单范围', options: [{ value: 'products', label: '产品' }, { value: 'projects', label: '项目' }, { value: 'executions', label: '执行' }] },
3890
+ scopeID: '范围ID',
3891
+ },
3892
+ }, {
3893
+ name: 'create',
3894
+ display: '创建测试单',
3895
+ type: 'create',
3896
+ method: 'post',
3897
+ path: '/testtasks',
3898
+ resultType: 'object',
3899
+ requestBody: {
3900
+ required: true,
3901
+ type: 'object',
3902
+ schema: {
3903
+ "type": "object",
3904
+ "properties": {
3905
+ "productID": {
3906
+ "type": "integer",
3907
+ "description": "所属产品ID",
3908
+ "format": "int32"
3909
+ },
3910
+ "name": {
3911
+ "type": "string",
3912
+ "description": "测试单名称"
3913
+ },
3914
+ "build": {
3915
+ "type": "integer",
3916
+ "description": "提测构建/版本",
3917
+ "format": "int32"
3918
+ },
3919
+ "execution": {
3920
+ "type": "integer",
3921
+ "description": "所属执行",
3922
+ "format": "int32"
3923
+ },
3924
+ "type": {
3925
+ "type": "array",
3926
+ "items": {
3927
+ "type": "string"
3928
+ },
3929
+ "description": "类型(integrate 集成测试 | system 系统测试 | acceptance 验收测试 | performance 性能测试 | safety 安全测试)"
3930
+ },
3931
+ "owner": {
3932
+ "type": "string",
3933
+ "description": "负责人"
3934
+ },
3935
+ "status": {
3936
+ "type": "string",
3937
+ "description": "状态(wait 未开始 | doing 进行中 | done 已关闭 | blocked 被阻塞)"
3938
+ },
3939
+ "begin": {
3940
+ "type": "string",
3941
+ "description": "开始日期"
3942
+ },
3943
+ "end": {
3944
+ "type": "string",
3945
+ "description": "结束日期"
3946
+ },
3947
+ "desc": {
3948
+ "type": "string",
3949
+ "description": "描述"
3950
+ }
3951
+ },
3952
+ "required": [
3953
+ "productID",
3954
+ "name",
3955
+ "build",
3956
+ "begin",
3957
+ "end"
3958
+ ]
3959
+ },
3960
+ },
3961
+ }, {
3962
+ name: 'update',
3963
+ display: '修改测试单',
3964
+ type: 'update',
3965
+ method: 'put',
3966
+ path: '/testtasks/{testtaskID}',
3967
+ resultType: 'object',
3968
+ pathParams: {
3969
+ testtaskID: '测试单ID',
3970
+ },
3971
+ requestBody: {
3972
+ required: true,
3973
+ type: 'object',
3974
+ schema: {
3975
+ "type": "object",
3976
+ "properties": {
3977
+ "name": {
3978
+ "type": "string",
3979
+ "description": "测试单名称"
3980
+ },
3981
+ "build": {
3982
+ "type": "integer",
3983
+ "description": "提测构建/版本",
3984
+ "format": "int32"
3985
+ },
3986
+ "execution": {
3987
+ "type": "integer",
3988
+ "description": "所属执行",
3989
+ "format": "int32"
3990
+ },
3991
+ "type": {
3992
+ "type": "array",
3993
+ "items": {
3994
+ "type": "string"
3995
+ },
3996
+ "description": "类型(integrate 集成测试 | system 系统测试 | acceptance 验收测试 | performance 性能测试 | safety 安全测试)"
3997
+ },
3998
+ "owner": {
3999
+ "type": "string",
4000
+ "description": "负责人"
4001
+ },
4002
+ "status": {
4003
+ "type": "string",
4004
+ "description": "状态(wait 未开始 | doing 进行中 | done 已关闭 | blocked 被阻塞)"
4005
+ },
4006
+ "begin": {
4007
+ "type": "string",
4008
+ "description": "开始日期"
4009
+ },
4010
+ "end": {
4011
+ "type": "string",
4012
+ "description": "结束日期"
4013
+ },
4014
+ "desc": {
4015
+ "type": "string",
4016
+ "description": "描述"
4017
+ }
4018
+ },
4019
+ "required": [
4020
+ "name",
4021
+ "build",
4022
+ "begin",
4023
+ "end"
4024
+ ]
4025
+ },
4026
+ },
4027
+ }, {
4028
+ name: 'delete',
4029
+ display: '删除测试单',
4030
+ type: 'delete',
4031
+ method: 'delete',
4032
+ path: '/testtasks/{testtaskID}',
4033
+ resultType: 'text',
4034
+ pathParams: {
4035
+ testtaskID: '测试单ID',
4036
+ },
4037
+ render: 'action',
4038
+ }
4039
+ ],
4040
+ },
4041
+ /* 发布模块 */
4042
+ {
4043
+ name: 'release',
4044
+ display: '发布',
4045
+ description: '发布管理,支持获取发布列表,支持获取产品下的发布、创建发布、修改发布、删除发布',
4046
+ actions: [
4047
+ {
4048
+ name: 'list',
4049
+ display: '获取发布列表,支持获取产品下的发布',
4050
+ type: 'list',
4051
+ method: 'get',
4052
+ path: '/{scope}/{scopeID}/releases',
4053
+ resultType: 'list',
4054
+ pagerGetter: 'pager',
4055
+ resultGetter: 'releases',
4056
+ pathParams: {
4057
+ scope: { description: '发布范围', options: [{ value: 'products', label: '产品' }] },
4058
+ scopeID: '范围ID',
4059
+ },
4060
+ }, {
4061
+ name: 'create',
4062
+ display: '创建发布',
4063
+ type: 'create',
4064
+ method: 'post',
4065
+ path: '/releases',
4066
+ resultType: 'object',
4067
+ requestBody: {
4068
+ required: true,
4069
+ type: 'object',
4070
+ schema: {
4071
+ "type": "object",
4072
+ "properties": {
4073
+ "productID": {
4074
+ "type": "integer",
4075
+ "description": "所属产品",
4076
+ "format": "int32"
4077
+ },
4078
+ "system": {
4079
+ "type": "integer",
4080
+ "description": "所属应用",
4081
+ "format": "int32"
4082
+ },
4083
+ "name": {
4084
+ "type": "string",
4085
+ "description": "应用版本号"
4086
+ },
4087
+ "build": {
4088
+ "type": "array",
4089
+ "items": {
4090
+ "type": "string"
4091
+ },
4092
+ "description": "包含构建"
4093
+ },
4094
+ "status": {
4095
+ "type": "string",
4096
+ "description": "状态(wait 未开始 | normal 已发布 | fail 发布失败 | terminate 停止维护)"
4097
+ },
4098
+ "date": {
4099
+ "type": "string",
4100
+ "description": "计划发布日期"
4101
+ },
4102
+ "desc": {
4103
+ "type": "string",
4104
+ "description": "描述"
4105
+ }
4106
+ },
4107
+ "required": [
4108
+ "productID",
4109
+ "system",
4110
+ "name",
4111
+ "build",
4112
+ "date"
4113
+ ]
4114
+ },
4115
+ },
4116
+ }, {
4117
+ name: 'update',
4118
+ display: '修改发布',
4119
+ type: 'update',
4120
+ method: 'put',
4121
+ path: '/releases/{releasID}',
4122
+ resultType: 'object',
4123
+ pathParams: {
4124
+ releasID: '发布ID',
4125
+ },
4126
+ requestBody: {
4127
+ required: true,
4128
+ type: 'object',
4129
+ schema: {
4130
+ "type": "object",
4131
+ "properties": {
4132
+ "system": {
4133
+ "type": "integer",
4134
+ "description": "所属应用",
4135
+ "format": "int32"
4136
+ },
4137
+ "name": {
4138
+ "type": "string",
4139
+ "description": "应用版本号"
4140
+ },
4141
+ "build": {
4142
+ "type": "array",
4143
+ "items": {
4144
+ "type": "string"
4145
+ },
4146
+ "description": "包含构建"
4147
+ },
4148
+ "status": {
4149
+ "type": "string",
4150
+ "description": "状态(wait 未开始 | normal 已发布 | fail 发布失败 | terminate 停止维护)"
4151
+ },
4152
+ "date": {
4153
+ "type": "string",
4154
+ "description": "计划发布日期"
4155
+ },
4156
+ "desc": {
4157
+ "type": "string",
4158
+ "description": "描述"
4159
+ }
4160
+ },
4161
+ "required": [
4162
+ "system",
4163
+ "name",
4164
+ "build",
4165
+ "date"
4166
+ ]
4167
+ },
4168
+ },
4169
+ }, {
4170
+ name: 'delete',
4171
+ display: '删除发布',
4172
+ type: 'delete',
4173
+ method: 'delete',
4174
+ path: '/releases/{releasID}',
4175
+ resultType: 'text',
4176
+ pathParams: {
4177
+ releasID: '发布ID',
4178
+ },
4179
+ render: 'action',
4180
+ }
4181
+ ],
4182
+ },
4183
+ /* 附件模块 */
4184
+ {
4185
+ name: 'file',
4186
+ display: '附件',
4187
+ description: '附件管理,支持编辑附件,修改附件的名称、删除附件',
4188
+ actions: [
4189
+ {
4190
+ name: 'create',
4191
+ display: '编辑附件,修改附件的名称',
4192
+ type: 'create',
4193
+ method: 'post',
4194
+ path: '/files',
4195
+ resultType: 'object',
4196
+ requestBody: {
4197
+ required: true,
4198
+ type: 'object',
4199
+ schema: {
4200
+ "type": "object",
4201
+ "properties": {
4202
+ "fileName": {
4203
+ "type": "string",
4204
+ "description": "附件名称"
4205
+ }
4206
+ },
4207
+ "required": [
4208
+ "fileName"
4209
+ ]
4210
+ },
4211
+ },
4212
+ }, {
4213
+ name: 'delete',
4214
+ display: '删除附件',
4215
+ type: 'delete',
4216
+ method: 'delete',
4217
+ path: '/files/{fileID}',
4218
+ resultType: 'text',
4219
+ pathParams: {
4220
+ fileID: '附件ID',
4221
+ },
4222
+ render: 'action',
4223
+ }
4224
+ ],
4225
+ }
4226
+ ];