Skip to content

Commit c5bad8e

Browse files
committed
Add names for all schemas
1 parent 896bff2 commit c5bad8e

File tree

1 file changed

+68
-66
lines changed

1 file changed

+68
-66
lines changed

openapi.yaml

Lines changed: 68 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ paths:
1515
content:
1616
application/json:
1717
schema:
18-
allOf:
19-
- $ref: '#/components/schemas/SuccessResponse'
20-
- type: object
21-
properties:
22-
data:
23-
$ref: '#/components/schemas/User'
18+
$ref: '#/components/schemas/UserResponse'
2419
'401':
2520
description: Unauthorized
2621
content:
@@ -39,28 +34,14 @@ paths:
3934
content:
4035
application/json:
4136
schema:
42-
type: object
43-
properties:
44-
query:
45-
type: string
46-
description: The search query string
47-
maxLength: 100
48-
required:
49-
- query
37+
$ref: '#/components/schemas/SearchRequest'
5038
responses:
5139
'200':
5240
description: A list of projects matching the search query
5341
content:
5442
application/json:
5543
schema:
56-
allOf:
57-
- $ref: '#/components/schemas/SuccessResponse'
58-
- type: object
59-
properties:
60-
data:
61-
type: array
62-
items:
63-
$ref: '#/components/schemas/Project'
44+
$ref: '#/components/schemas/ProjectListResponse'
6445
/projects:
6546
get:
6647
tags:
@@ -72,14 +53,7 @@ paths:
7253
content:
7354
application/json:
7455
schema:
75-
allOf:
76-
- $ref: '#/components/schemas/SuccessResponse'
77-
- type: object
78-
properties:
79-
data:
80-
type: array
81-
items:
82-
$ref: '#/components/schemas/Project'
56+
$ref: '#/components/schemas/ProjectListResponse'
8357
/project/{name}:
8458
get:
8559
tags:
@@ -98,12 +72,7 @@ paths:
9872
content:
9973
application/json:
10074
schema:
101-
allOf:
102-
- $ref: '#/components/schemas/SuccessResponse'
103-
- type: object
104-
properties:
105-
data:
106-
$ref: '#/components/schemas/Project'
75+
$ref: '#/components/schemas/ProjectResponse'
10776
404:
10877
$ref: '#/components/responses/ProjectNotFound'
10978
/builds/{project}:
@@ -124,16 +93,7 @@ paths:
12493
content:
12594
application/json:
12695
schema:
127-
allOf:
128-
- $ref: '#/components/schemas/SuccessResponse'
129-
- type: object
130-
properties:
131-
data:
132-
type: object
133-
additionalProperties:
134-
type: array
135-
items:
136-
$ref: '#/components/schemas/Build'
96+
$ref: '#/components/schemas/BuildMapResponse'
13797
404:
13898
$ref: '#/components/responses/ProjectNotFound'
13999
/builds/{project}/{channel}/:
@@ -160,14 +120,7 @@ paths:
160120
content:
161121
application/json:
162122
schema:
163-
allOf:
164-
- $ref: '#/components/schemas/SuccessResponse'
165-
- type: object
166-
properties:
167-
data:
168-
type: array
169-
items:
170-
$ref: '#/components/schemas/Build'
123+
$ref: '#/components/schemas/BuildListResponse'
171124
404:
172125
$ref: '#/components/responses/ProjectOrChannelNotFound'
173126
/builds/{project}/{channel}/latest:
@@ -194,12 +147,7 @@ paths:
194147
content:
195148
application/json:
196149
schema:
197-
allOf:
198-
- $ref: '#/components/schemas/SuccessResponse'
199-
- type: object
200-
properties:
201-
data:
202-
$ref: '#/components/schemas/Build'
150+
$ref: '#/components/schemas/BuildResponse'
203151
404:
204152
$ref: '#/components/responses/ProjectOrChannelNotFound'
205153
/builds/{project}/{channel}/{build}:
@@ -233,12 +181,7 @@ paths:
233181
content:
234182
application/json:
235183
schema:
236-
allOf:
237-
- $ref: '#/components/schemas/SuccessResponse'
238-
- type: object
239-
properties:
240-
data:
241-
$ref: '#/components/schemas/Build'
184+
$ref: '#/components/schemas/BuildResponse'
242185
404:
243186
description: Project, release channel or build not found
244187
content:
@@ -292,6 +235,13 @@ components:
292235
- success
293236
- error
294237
- code
238+
UserResponse:
239+
allOf:
240+
- $ref: '#/components/schemas/SuccessResponse'
241+
- type: object
242+
properties:
243+
data:
244+
$ref: '#/components/schemas/User'
295245
User:
296246
type: object
297247
properties:
@@ -326,6 +276,31 @@ components:
326276
- apiToken
327277
- flags
328278
- betaFlags
279+
SearchRequest:
280+
type: object
281+
properties:
282+
query:
283+
type: string
284+
description: The search query string
285+
maxLength: 100
286+
required:
287+
- query
288+
ProjectListResponse:
289+
allOf:
290+
- $ref: '#/components/schemas/SuccessResponse'
291+
- type: object
292+
properties:
293+
data:
294+
type: array
295+
items:
296+
$ref: '#/components/schemas/Project'
297+
ProjectResponse:
298+
allOf:
299+
- $ref: '#/components/schemas/SuccessResponse'
300+
- type: object
301+
properties:
302+
data:
303+
$ref: '#/components/schemas/Project'
329304
Project:
330305
type: object
331306
properties:
@@ -372,6 +347,33 @@ components:
372347
- wikiLink
373348
- releaseChannels
374349
- defaultReleaseChannel
350+
BuildMapResponse:
351+
allOf:
352+
- $ref: '#/components/schemas/SuccessResponse'
353+
- type: object
354+
properties:
355+
data:
356+
type: object
357+
additionalProperties:
358+
type: array
359+
items:
360+
$ref: '#/components/schemas/Build'
361+
BuildListResponse:
362+
allOf:
363+
- $ref: '#/components/schemas/SuccessResponse'
364+
- type: object
365+
properties:
366+
data:
367+
type: array
368+
items:
369+
$ref: '#/components/schemas/Build'
370+
BuildResponse:
371+
allOf:
372+
- $ref: '#/components/schemas/SuccessResponse'
373+
- type: object
374+
properties:
375+
data:
376+
$ref: '#/components/schemas/Build'
375377
Build:
376378
type: object
377379
properties:

0 commit comments

Comments
 (0)