-
Notifications
You must be signed in to change notification settings - Fork 6
/
bundle.yaml
541 lines (541 loc) · 12.4 KB
/
bundle.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
swagger: '2.0'
info:
description: >
goliac is a golang REST application skeleton The base path for all the APIs
is "/api/v1".
title: goliac
version: 1.0.0
tags:
- name: health
description: Check if goliac is healthy
x-tagGroups:
- name: goliac Management
tags:
- app
- name: Health Check
tags:
- health
consumes:
- application/json
produces:
- application/json
schemes:
- http
basePath: /api/v1
paths:
/liveness:
get:
tags:
- health
operationId: getLiveness
description: Check if Goliac is healthy
responses:
'200':
description: status of health check
schema:
$ref: '#/definitions/health'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/readiness:
get:
tags:
- health
operationId: getReadiness
description: Check if Goliac is ready to serve
responses:
'200':
description: status of health check
schema:
$ref: '#/definitions/health'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/flushcache:
post:
tags:
- app
operationId: postFlushCache
description: Flush the Github remote cache
responses:
'200':
description: cache flushed
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/resync:
post:
tags:
- app
operationId: postResync
description: Ask to sync again against Github
responses:
'200':
description: resync in progress
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/status:
get:
tags:
- app
operationId: getStatus
description: Get different status on Goliac
responses:
'200':
description: get Goliac status
schema:
$ref: '#/definitions/status'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/users:
get:
tags:
- app
operationId: getUsers
description: Get all users
responses:
'200':
description: get list of users (organization or external)
schema:
$ref: '#/definitions/users'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/users/{userID}:
get:
tags:
- app
operationId: getUser
parameters:
- in: path
name: userID
description: user name
required: true
type: string
minLength: 1
description: Get user and associated teams and repos
responses:
'200':
description: get user details especially teams and repositories
schema:
$ref: '#/definitions/userDetails'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/collaborators:
get:
tags:
- app
operationId: getCollaborators
description: Get all external collaborators
responses:
'200':
description: get list of collarators
schema:
$ref: '#/definitions/users'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/collaborators/{collaboratorID}:
get:
tags:
- app
operationId: getCollaborator
parameters:
- in: path
name: collaboratorID
description: collaborator name
required: true
type: string
minLength: 1
description: Get collaborator and repos
responses:
'200':
description: get collaborator details especially repositories
schema:
$ref: '#/definitions/collaboratorDetails'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/teams:
get:
tags:
- app
operationId: getTeams
description: Get all teams
responses:
'200':
description: get list of teams
schema:
$ref: '#/definitions/teams'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/teams/{teamID}:
get:
tags:
- app
operationId: getTeam
parameters:
- in: path
name: teamID
description: team name
required: true
type: string
minLength: 1
description: Get team and associated users and repos
responses:
'200':
description: get team details especially users and repositories
schema:
$ref: '#/definitions/teamDetails'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/repositories:
get:
tags:
- app
operationId: getRepositories
description: Get all repositories
responses:
'200':
description: get list of repositories
schema:
$ref: '#/definitions/repositories'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/repositories/{repositoryID}:
get:
tags:
- app
operationId: getRepository
parameters:
- in: path
name: repositoryID
description: repository slug name
required: true
type: string
minLength: 1
description: Get repository and associated teams
responses:
'200':
description: get repository details especially teams that have access
schema:
$ref: '#/definitions/repositoryDetails'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/statistics:
get:
tags:
- app
operationId: getStatitics
description: Get different statistics on Goliac
responses:
'200':
description: get Goliac statistics
schema:
$ref: '#/definitions/statistics'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
/unmanaged:
get:
tags:
- app
operationId: getUnmanaged
description: Get unmanaged resources metrics
responses:
'200':
description: get Goliac unmanaged resources metrics
schema:
$ref: '#/definitions/unmanaged'
default:
description: generic error response
schema:
$ref: '#/definitions/error'
definitions:
health:
type: object
properties:
status:
type: string
users:
type: array
items:
$ref: '#/definitions/user'
user:
type: object
properties:
name:
type: string
x-isnullable: false
githubid:
type: string
x-isnullable: false
userDetails:
type: object
properties:
githubid:
type: string
x-isnullable: false
teams:
type: array
items:
$ref: '#/definitions/team'
repositories:
type: array
items:
$ref: '#/definitions/repository'
collaboratorDetails:
type: object
properties:
githubid:
type: string
x-isnullable: false
repositories:
type: array
items:
$ref: '#/definitions/repository'
repository:
type: object
properties:
name:
type: string
x-isnullable: false
public:
type: boolean
x-isnullable: false
x-omitempty: false
autoMergeAllowed:
type: boolean
x-isnullable: false
x-omitempty: false
deleteBranchOnMerge:
type: boolean
x-isnullable: false
x-omitempty: false
allowUpdateBranch:
type: boolean
x-isnullable: false
x-omitempty: false
archived:
type: boolean
x-isnullable: false
x-omitempty: false
repositories:
type: array
items:
$ref: '#/definitions/repository'
repositoryDetails:
type: object
properties:
name:
type: string
x-isnullable: false
public:
type: boolean
x-isnullable: false
x-omitempty: false
archived:
type: boolean
x-isnullable: false
x-omitempty: false
autoMergeAllowed:
type: boolean
x-isnullable: false
x-omitempty: false
deleteBranchOnMerge:
type: boolean
x-isnullable: false
x-omitempty: false
allowUpdateBranch:
type: boolean
x-isnullable: false
x-omitempty: false
teams:
type: array
items:
type: object
properties:
name:
type: string
minLength: 1
access:
type: string
minLength: 1
collaborators:
type: array
items:
type: object
properties:
name:
type: string
minLength: 1
access:
type: string
minLength: 1
teams:
type: array
items:
$ref: '#/definitions/team'
team:
type: object
properties:
name:
type: string
x-isnullable: false
path:
type: string
x-isnullable: false
owners:
type: array
items:
type: string
minLength: 1
members:
type: array
items:
type: string
minLength: 1
teamDetails:
type: object
properties:
name:
type: string
x-isnullable: false
path:
type: string
x-isnullable: false
owners:
type: array
items:
type: object
properties:
name:
type: string
minLength: 1
githubid:
type: string
x-isnullable: false
external:
type: boolean
x-isnullable: false
x-omitempty: false
members:
type: array
items:
type: object
properties:
name:
type: string
minLength: 1
githubid:
type: string
x-isnullable: false
external:
type: boolean
x-isnullable: false
x-omitempty: false
repositories:
type: array
items:
$ref: '#/definitions/repository'
status:
type: object
properties:
lastSyncTime:
type: string
minLength: 1
lastSyncError:
type: string
nbUsers:
type: integer
x-omitempty: false
nbUsersExternal:
type: integer
x-omitempty: false
nbTeams:
type: integer
x-omitempty: false
nbRepos:
type: integer
x-omitempty: false
version:
type: string
detailedErrors:
type: array
items:
type: string
detailedWarnings:
type: array
items:
type: string
statistics:
properties:
lastTimeToApply:
type: string
x-omitempty: false
lastGithubApiCalls:
type: integer
x-omitempty: false
lastGithubThrottled:
type: integer
x-omitempty: false
maxTimeToApply:
type: string
x-omitempty: false
maxGithubApiCalls:
type: integer
x-omitempty: false
maxGithubThrottled:
type: integer
x-omitempty: false
unmanaged:
properties:
users:
type: array
items:
type: string
minLength: 1
teams:
type: array
items:
type: string
minLength: 1
repos:
type: array
items:
type: string
minLength: 1
rulesets:
type: array
items:
type: string
minLength: 1
error:
type: object
required:
- message
properties:
message:
type: string
minLength: 1