-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathswagger.yaml
732 lines (731 loc) · 22.3 KB
/
swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
swagger: '2.0'
info:
description: "Milla is mostly Qt Jira-specific orchestrator service for the OpenReq Qt trial that operates between Qt Jira and the OpenReq infrastructure. Milla has five main functionalities divided into three different controllers. <br>\r\n<b>Milla controller:</b><br>1) Milla fetches all or updated data from Qt Jira and stores in a caching manner the data in the Mallikas database service. <br>2) Milla orchestrates the communication to Mallikas database service so that a project, requirement etc. can be manipulated (CRUD manner) in Mallikas database service in OpenReq JSON format.<br>3) Milla orchestrates the data from Mallikas database service to Mulperi service in order to manage dependencies, carry out analyses etc. \n<br><b>Detection controller:</b><br>4) Milla calls the natural language processing services of OpenReq infrastructre that can detect from the requirements text hidden or implicit dependencies to other requirements. <br>\r\n<b>Qt controller:</b><br>5) Milla provides the access point for the Qt Jira dependency browser in the Qt trial. <br>\r\n"
version: '1.14'
title: Milla
basePath: /
tags:
- name: qt-controller
description: Qt Controller
- name: milla-controller
description: Milla Controller
- name: detection-controller
description: Detection Controller
paths:
/detectedFromServices:
get:
tags:
- detection-controller
summary: Get results from all detection services for the requirement id
operationId: getDetectedFromServicesUsingGET
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: requirementId
in: query
description: requirementId
required: true
type: string
responses:
'200':
description: OK
schema:
type: string
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/getConsistencyCheckForRequirement:
get:
tags:
- qt-controller
summary: Get consistency check for the transitive closure of a requirement
description: 'First the transitive closure is created, then a consistency check is performed on it. Can now also provide custom depth value (layerCount), defaults to 5.'
operationId: getConsistencyCheckForRequirementUsingGET
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: requirementId
in: query
description: requirementId
required: true
type: array
items:
type: string
collectionFormat: multi
- name: layerCount
in: query
description: layerCount
required: false
type: integer
format: int32
- name: analysisOnly
in: query
description: analysisOnly
required: false
type: boolean
- name: timeOut
in: query
description: timeOut
required: false
type: integer
default: 0
format: int32
responses:
'200':
description: 'Success, returns JSON model'
schema:
type: string
'400':
description: 'Failure, ex. model not found'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'409':
description: Conflict
/getDependenciesOfRequirement:
get:
tags:
- qt-controller
summary: Get the dependencies of a requirement
description: 'Get the dependencies of a requirement, with minimum score and max results as params'
operationId: getDependenciesOfRequirementUsingGET
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: requirementId
in: query
description: requirementId
required: true
type: string
- name: scoreThreshold
in: query
description: scoreThreshold
required: false
type: number
format: double
- name: maxResults
in: query
description: maxResults
required: false
type: integer
format: int32
responses:
'200':
description: 'Success, returns JSON model'
schema:
type: string
'400':
description: 'Failure, ex. model not found'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'409':
description: Conflict
/getJiraAuthorizationAddress:
get:
tags:
- milla-controller
summary: Get address used in authorizing Milla for Jira
description: 'Initialize authorization process and receive Jira authorization address, where user has to log in to receive a secret key'
operationId: jiraAuthorizationAddressUsingGET
consumes:
- application/json
produces:
- '*/*'
responses:
'200':
description: OK
schema:
type: string
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/getTopProposedDependenciesOfRequirement:
get:
tags:
- qt-controller
summary: Detect and get top X proposed dependencies of a requirement
description: Get the top dependencies as proposed by all detection services
operationId: getTopProposedDependenciesUsingGET
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: requirementId
in: query
description: requirementId
required: true
type: array
items:
type: string
collectionFormat: multi
- name: maxResults
in: query
description: maxResults
required: false
type: integer
default: 20
format: int32
responses:
'200':
description: 'Success, returns JSON model'
schema:
type: string
'400':
description: 'Failure, ex. model not found'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'409':
description: Conflict
/getTransitiveClosureOfRequirement:
get:
tags:
- qt-controller
summary: Get the transitive closure of a requirement
description: Returns the transitive closure of a given requirement up to the depth of 5. Can now also provide custom depth value (layerCount).
operationId: getTransitiveClosureOfRequirementUsingGET
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: requirementId
in: query
description: requirementId
required: true
type: array
items:
type: string
collectionFormat: multi
- name: layerCount
in: query
description: layerCount
required: false
type: integer
format: int32
responses:
'200':
description: 'Success, returns JSON model'
schema:
type: string
'400':
description: 'Failure, ex. model not found'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'409':
description: Conflict
/projectToORSI:
post:
tags:
- detection-controller
summary: Post a project to ORSI cluster computation
operationId: postProjectToORSIUsingPOST
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: projectId
in: query
description: projectId
required: true
type: string
- name: threshold
in: query
description: threshold
required: false
type: number
default: 0.3
format: double
responses:
'200':
description: OK
schema:
type: string
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/projectToServices:
post:
tags:
- detection-controller
summary: Post a project to all detection services
operationId: postProjectToServicesUsingPOST
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: projectId
in: query
description: projectId
required: true
type: string
responses:
'200':
description: OK
schema:
type: string
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/qtJira:
post:
tags:
- milla-controller
summary: Import a selected project from Qt Jira and store a cache of the project in Mallikas
description: '<b>Functionality</b>: This is the full data import from Qt Jira. A selected project including its issues are fetched from Qt Jira. The data is converted to OpenReq JSON requirements and dependencies, and OpenReq JSON project is constructed. The project, including its requirements and dependencies, is cached to Mallikas database<br><b>Postcondition</b>: The selected project is cached in Mallikas to be managed in the OpenReq infrastructure. The same project name (id) is used in Qt Jira and Mallikas.<br><b>Note:</b> For update rather than full import, see "qtJiraUpdated", which is more efficient for large projects.</b><br><b>Parameter: </b><br>projectId: The id of the project to be fetched from Qt Jira (e.g., QTWB).'
operationId: importFromQtJiraUsingPOST
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: projectId
in: query
description: projectId
required: true
type: string
responses:
'200':
description: OK
schema:
type: string
'201':
description: 'Success, all requirements and dependencies downloaded'
schema:
type: string
'400':
description: 'Failure, ex. malformed JSON'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'500':
description: 'Failure, ex. invalid URLs'
/qtJiraUpdated:
post:
tags:
- milla-controller
summary: Import updated issues from Qt Jira to Mallikas.
description: '<b>Functionality</b>: Import the updated Jira issues of a project from Qt Jira and send the issues as OpenReq JSON requirements and dependencies to be cached in Mallikas database<br><b>Precondition</b>: The project has been cached in Mallikas.<br><b>Postcondition</b>: New or changed Jira issues are updated to Mallikas<br><b>Exception</b>: This is not full synchronization.<br><b>Parameter: </b><br>projectId: The id of the Qt Jira project (e.g., QTWB).'
operationId: importUpdatedFromQtJiraUsingPOST
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: projectId
in: query
description: projectId
required: true
type: string
responses:
'200':
description: 'Success, all updated requirements and dependencies downloaded'
schema:
type: string
'201':
description: Created
'400':
description: 'Failure, ex. malformed JSON'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'500':
description: 'Failure, ex. invalid URLs'
/requirementsByIds:
post:
tags:
- milla-controller
summary: Fetch a specified set of requirements in OpenReq JSON format.
description: '<b>Functionality</b>: Fetch specified requirements and their dependencies that are cached in Mallikas database in OpenReq JSON format.<br><b>Precondition</b>: The project has been cached in Mallikas.<br><b>Postcondition</b>: An OpenReq JSON of the requirements and their dependencies is produced.<br><b>Parameter: </b><br>ids: ids as a String array, e.g. ["QTWB-1", "QTWB-2"] '
operationId: getRequirementsByIdsUsingPOST
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: ids
in: query
description: ids
required: true
type: array
items:
type: string
collectionFormat: multi
responses:
'200':
description: OK
schema:
type: object
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/requirementsByParams:
post:
tags:
- milla-controller
summary: Fetch requirements based on various parameters posted in JSON format.
description: '<b>Functionality</b>: Fetch requirements based on various parameters given in JSON format.<br><b>Precondition</b>: The project has been cached in Mallikas.<br><b>Postcondition</b>: An OpenReq JSON of the requirements and their dependencies is produced.<br><b>Parameter: </b><br>params: RequestParams object containing various parameters to be used in database query'
operationId: getRequirementsByParamsUsingPOST
consumes:
- application/json
produces:
- '*/*'
parameters:
- in: body
name: params
description: params
required: true
schema:
$ref: '#/definitions/RequestParams'
responses:
'200':
description: OK
schema:
type: object
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/requirementsInProject:
get:
tags:
- milla-controller
summary: Fetch all requirements of a project in OpenReq JSON format.
description: '<b>Functionality</b>: Fetch all requirements of a project including their dependencies that are cached in Mallikas database in the OpenReq JSON format.<br><b>Precondition</b>: The project has been cached in Mallikas.<br><b>Postcondition</b>: An OpenReq JSON of the project including requirements and dependencies is produced.<br><b>Parameter: </b><br>projectId: The project id in Mallikas (e.g., QTWB).<br>includeProposed: Whether to fetch proposed dependencies'
operationId: getRequirementsInProjectUsingGET
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: projectId
in: query
description: projectId
required: true
type: string
- name: includeProposed
in: query
description: includeProposed
required: false
type: boolean
- name: requirementsOnly
in: query
description: requirementsOnly
required: false
type: boolean
responses:
'200':
description: OK
schema:
type: object
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/sendProjectToMulperi:
post:
tags:
- milla-controller
summary: Send all requirements of the selected project to Mulperi.
description: '<b>Functionality</b>: All requirements of a project, excluding their proposed dependencies, are fetched from Mallikas database and sent to Mulperi to construct a transitive closure. <br><b>Precondition</b>: The project, including its requirements, has been cached in Mallikas.<br><b>Postcondition</b>: Mulperi has a transitive closure of each requirement for a project up to depth five.<br><br><b>Parameter: </b><br>projectId: The project id in Mallikas (e.g., QTWB).'
operationId: sendProjectToMulperiUsingPOST
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: projectId
in: query
description: projectId
required: true
type: string
responses:
'200':
description: OK
schema:
type: string
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/testJiraAuthorization:
get:
tags:
- milla-controller
summary: Test if authorized for Jira
description: 'Test if successfully authorized for Jira, returns some user statistics on success'
operationId: testUsingGET
consumes:
- application/json
produces:
- '*/*'
responses:
'200':
description: OK
schema:
type: string
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/updateProject:
post:
tags:
- qt-controller
summary: Fetch whole project from Qt Jira to Mallikas and update the graph in KeljuCaas
description: Post a Project to Mallikas database and KeljuCaas
operationId: updateWholeProjectUsingPOST
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: projectId
in: query
description: projectId
required: true
type: string
responses:
'200':
description: OK
schema:
type: object
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/updateProposedDependencies:
post:
tags:
- qt-controller
summary: Update proposed dependencies by user input
description: 'Update proposed dependencies, were they accepted or rejected? If accepted, what is the type?'
operationId: updateProposedDependenciesUsingPOST
consumes:
- application/json
produces:
- '*/*'
parameters:
- in: body
name: dependencies
description: dependencies
required: true
schema:
type: array
items:
$ref: '#/definitions/Dependency'
responses:
'200':
description: 'Success, returns JSON model'
schema:
type: string
'201':
description: Created
'400':
description: 'Failure, ex. model not found'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
'409':
description: Conflict
/updateRecentInProject:
post:
tags:
- qt-controller
summary: Fetch only the most recent issues of a project from Qt Jira to Mallikas and update the graph in KeljuCaas
description: Post recent issues in a project to Mallikas database and KeljuCaas
operationId: updateMostRecentIssuesInProjectUsingPOST
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: projectId
in: query
description: projectId
required: true
type: string
responses:
'200':
description: OK
schema:
type: object
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
/verifyJiraAuthorization:
post:
tags:
- milla-controller
summary: Authorize Milla for Jira with a secret key
description: Use a secret key received from Jira to authorize Milla
operationId: sendSecretUsingPOST
consumes:
- application/json
produces:
- '*/*'
parameters:
- in: body
name: secret
description: secret
required: true
schema:
type: string
responses:
'200':
description: OK
schema:
type: string
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
definitions:
Dependency:
type: object
properties:
created_at:
type: integer
format: int64
dependency_score:
type: number
format: double
dependency_type:
type: string
enum:
- CONTRIBUTES
- DAMAGES
- REFINES
- REQUIRES
- INCOMPATIBLE
- DECOMPOSITION
- SIMILAR
- DUPLICATES
- REPLACES
description:
type: array
items:
type: string
fromid:
type: string
id:
type: string
status:
type: string
enum:
- PROPOSED
- ACCEPTED
- REJECTED
toid:
type: string
RequestParams:
type: object
properties:
created_at:
type: string
format: date-time
includeProposed:
type: boolean
includeRejected:
type: boolean
maxDependencies:
type: integer
format: int32
modified_at:
type: string
format: date-time
projectId:
type: string
proposedOnly:
type: boolean
requirementIds:
type: array
items:
type: string
resolution:
type: string
scoreThreshold:
type: number
format: double
status:
type: string
type:
type: string