Skip to content

Commit 4f3b8da

Browse files
authored
Merge pull request #186 from qase-tms/shared_parameters
add shared parameters specs
2 parents 59cb79e + e1e12ba commit 4f3b8da

24 files changed

+368
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: id
2+
in: path
3+
description: Identifier.
4+
required: true
5+
schema:
6+
type: string
7+
format: uuid
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
get:
2+
operationId: get-shared-parameter
3+
tags: [ shared-parameters ]
4+
summary: Get a specific shared parameter
5+
parameters:
6+
- $ref: '../parameters/Uuid.yaml'
7+
responses:
8+
200:
9+
description: A shared parameter.
10+
content:
11+
application/json:
12+
schema:
13+
$ref: '../schemas/responses/SharedParameterResponse.yaml'
14+
400:
15+
description: Bad Request.
16+
401:
17+
description: Unauthorized.
18+
403:
19+
description: Forbidden.
20+
404:
21+
description: Not Found.
22+
429:
23+
description: Too Many Requests.
24+
25+
patch:
26+
operationId: update-shared-parameter
27+
tags: [ shared-parameters ]
28+
summary: Update shared parameter
29+
parameters:
30+
- $ref: '../parameters/Uuid.yaml'
31+
requestBody:
32+
required: true
33+
content:
34+
application/json:
35+
schema:
36+
$ref: '../schemas/SharedParameter.update.yaml'
37+
responses:
38+
200:
39+
description: OK.
40+
content:
41+
application/json:
42+
schema:
43+
$ref: '../schemas/responses/UuidResponse.yaml'
44+
400:
45+
description: Bad Request.
46+
401:
47+
description: Unauthorized.
48+
403:
49+
description: Forbidden.
50+
404:
51+
description: Not Found.
52+
429:
53+
description: Too Many Requests.
54+
55+
delete:
56+
operationId: delete-shared-parameter
57+
tags: [ shared-parameters ]
58+
summary: Delete shared parameter along with all its usages in test cases and reviews.
59+
parameters:
60+
- $ref: '../parameters/Uuid.yaml'
61+
responses:
62+
200:
63+
description: Success.
64+
content:
65+
application/json:
66+
schema:
67+
$ref: '../schemas/responses/UuidResponse.yaml'
68+
400:
69+
description: Bad Request.
70+
401:
71+
description: Unauthorized.
72+
403:
73+
description: Forbidden.
74+
404:
75+
description: Not Found.
76+
429:
77+
description: Too Many Requests.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
get:
2+
operationId: get-shared-parameters
3+
tags: [ shared-parameters ]
4+
summary: Get all shared parameters
5+
parameters:
6+
- $ref: '../parameters/pagination/Limit.yaml'
7+
- $ref: '../parameters/pagination/Offset.yaml'
8+
- in: query
9+
name: filters[search]
10+
schema:
11+
type: string
12+
- in: query
13+
name: filters[type]
14+
schema:
15+
type: string
16+
enum: [single, group]
17+
- in: query
18+
name: filters[project_codes][]
19+
schema:
20+
type: array
21+
items:
22+
type: string
23+
minLength: 2
24+
maxLength: 10
25+
responses:
26+
200:
27+
description: A list of all shared parameters.
28+
content:
29+
application/json:
30+
schema:
31+
$ref: '../schemas/responses/SharedParameterListResponse.yaml'
32+
400:
33+
description: Bad Request.
34+
401:
35+
description: Unauthorized.
36+
403:
37+
description: Forbidden.
38+
404:
39+
description: Not Found.
40+
429:
41+
description: Too Many Requests.
42+
43+
post:
44+
operationId: create-shared-parameter
45+
tags: [ shared-parameters ]
46+
requestBody:
47+
required: true
48+
content:
49+
application/json:
50+
schema:
51+
$ref: '../schemas/SharedParameter.create.yaml'
52+
responses:
53+
200:
54+
description: A shared parameter.
55+
content:
56+
application/json:
57+
schema:
58+
$ref: '../schemas/responses/UuidResponse.yaml'
59+
400:
60+
description: Bad Request.
61+
401:
62+
description: Unauthorized.
63+
403:
64+
description: Forbidden.
65+
404:
66+
description: Not Found.
67+
422:
68+
description: Unprocessable Entity.
69+
429:
70+
description: Too Many Requests.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
type: object
2+
description: Group parameter
3+
properties:
4+
items:
5+
type: array
6+
minItems: 2
7+
items:
8+
$ref: 'Parameter.Single.yaml'
9+
required:
10+
- items
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
type: object
2+
description: Shared parameter
3+
properties:
4+
shared_id:
5+
type: string
6+
format: uuid
7+
required:
8+
- shared_id
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
type: object
2+
description: Single parameter
3+
properties:
4+
title:
5+
type: string
6+
values:
7+
type: array
8+
items:
9+
type: string
10+
required:
11+
- title
12+
- values
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type: array
2+
description: Group parameter
3+
minItems: 2
4+
items:
5+
$ref: 'Parameter.Single.yaml'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
oneOf:
2+
- $ref: 'SharedParameter.Single.yaml'
3+
- $ref: 'SharedParameter.Group.yaml'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
type: array
2+
description: Single parameter
3+
minItems: 1
4+
maxItems: 1
5+
items:
6+
$ref: 'Parameter.Single.yaml'
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
type: object
2+
properties:
3+
title:
4+
type: string
5+
maxLength: 255
6+
type:
7+
type: string
8+
enum: [single, group]
9+
project_codes:
10+
type: array
11+
items:
12+
type: string
13+
description: List of project codes to associate with this shared parameter
14+
is_enabled_for_all_projects:
15+
type: boolean
16+
parameters:
17+
$ref: 'SharedParameter.Parameter.yaml'
18+
required:
19+
- title
20+
- type
21+
- is_enabled_for_all_projects
22+
- parameters

0 commit comments

Comments
 (0)