Skip to content

Commit 64e850b

Browse files
committed
g
1 parent c2757d0 commit 64e850b

File tree

1 file changed

+44
-75
lines changed

1 file changed

+44
-75
lines changed

specs/bulk_update.yaml

Lines changed: 44 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ paths:
2626
content:
2727
application/json:
2828
schema:
29-
$ref: '#/components/schemas/BulkUpdateSeeExampleResponse'
29+
type: array
30+
items:
31+
$ref: '#/components/schemas/BulkUpdateSeeExampleResponse'
3032
'500':
3133
description: Internal Server Error
3234
content:
@@ -50,9 +52,7 @@ paths:
5052
content:
5153
application/json:
5254
schema:
53-
type: array
54-
items:
55-
$ref: '#/components/schemas/ImpactedObjectsResponse'
55+
$ref: '#/components/schemas/ImpactedObjectsResponse'
5656
'400':
5757
description: Bad Request. Validation error/wrong request body.
5858
content:
@@ -115,7 +115,7 @@ components:
115115
required:
116116
- Script
117117
properties:
118-
resource:
118+
operation:
119119
type: string
120120
description: Resource from url path, i.e. {apiVersion} & {kind}
121121
script:
@@ -158,41 +158,43 @@ components:
158158
global:
159159
type: boolean
160160
description: Global flag for updating dependent apps
161-
DeploymentTemplate:
161+
deploymentTemplate:
162162
$ref: '#/components/schemas/Tasks'
163-
ConfigMaps:
164-
type: object
165-
properties:
166-
names:
167-
type: array
168-
items:
169-
type: string
170-
description : Name of All ConfigMaps to be updated
171-
tasks:
172-
$ref: '#/components/schemas/Spec'
173-
Secrets:
174-
type: object
175-
properties:
176-
names:
177-
type: array
178-
items:
179-
type: string
180-
description : Name of All Secrets to be updated
181-
tasks:
182-
$ref: '#/components/schemas/Spec'
163+
configMap:
164+
$ref: '#/components/schemas/CmAndSecret'
165+
secret:
166+
$ref: '#/components/schemas/CmAndSecret'
183167
Tasks:
184168
type: object
185169
properties:
186170
spec:
187171
$ref: '#/components/schemas/Spec'
188172
description: Spec of the Task
173+
CmAndSecret:
174+
type: object
175+
properties:
176+
spec:
177+
$ref: '#/components/schemas/CmAndSecretSpec'
178+
description: Spec of the ConfigMap/Secret
179+
CmAndSecretSpec:
180+
type: object
181+
required:
182+
- names
183+
properties:
184+
names:
185+
type: array
186+
items:
187+
type: string
188+
description: Names of all configmaps/secrets to be updated
189+
patchData:
190+
type: string
191+
description: string with details of the patch to be used for updating
189192
Spec:
190193
type: object
191194
properties:
192195
patchData:
193196
type: string
194197
description: string with details of the patch to be used for updating
195-
196198
NameIncludesExcludes:
197199
type: object
198200
properties:
@@ -249,91 +251,58 @@ components:
249251
type: object
250252
properties:
251253
deploymentTemplate:
252-
$ref: '#/components/schemas/DeploymentTemplateBulkUpdateResponse'
253-
configMap:
254-
$ref: '#/components/schemas/CmAndSecretBulkUpdateResponse'
255-
secret:
256-
$ref: '#/components/schemas/CmAndSecretBulkUpdateResponse'
257-
DeploymentTemplateBulkUpdateResponse:
258-
type: object
259-
properties:
260-
message:
261-
type: array
262-
items:
263-
type: string
264-
description: All top-level messages in response of bulk update action
265-
failure:
266254
type: array
267255
items:
268256
$ref: '#/components/schemas/DeploymentTemplateBulkUpdateResponseForOneApp'
269-
description: Details of all apps on which bulk update failed
270-
successful:
271-
type: array
272-
items:
273-
$ref: '#/components/schemas/DeploymentTemplateBulkUpdateResponseForOneApp'
274-
description: Details of all apps on which bulk update applied successfully
275-
CmAndSecretBulkUpdateResponse:
276-
type: object
277-
properties:
278-
message:
279-
type: array
280-
items:
281-
type: string
282-
description: All top-level messages in response of bulk update action
283-
failure:
257+
configMap:
284258
type: array
285259
items:
286260
$ref: '#/components/schemas/CmAndSecretBulkUpdateResponseForOneApp'
287-
description: Details of all apps on which bulk update failed
288-
successful:
261+
secret:
289262
type: array
290263
items:
291264
$ref: '#/components/schemas/CmAndSecretBulkUpdateResponseForOneApp'
292-
description: Details of all apps on which bulk update applied successfully
293265
DeploymentTemplateBulkUpdateResponseForOneApp:
294266
type: object
295267
properties:
296268
appId:
297269
type: integer
298-
description: Id of the concerned app
270+
description: Id of the impacted app
299271
appName:
300272
type: string
301-
description: Name of the concerned app
273+
description: Name of the impacted app
302274
envId:
303-
type: integer
304-
description: Env ID of the concerned app
275+
type: string
276+
description: Env Id of the impacted app
305277
message:
306278
type: string
307-
description: App-level message for the concerned app
279+
description: Message indicating success or failure of the update
308280
CmAndSecretBulkUpdateResponseForOneApp:
309281
type: object
310282
properties:
311283
appId:
312284
type: integer
313-
description: Id of the concerned app
285+
description: Id of the impacted app
314286
appName:
315287
type: string
316-
description: Name of the concerned app
288+
description: Name of the impacted app
317289
envId:
318-
type: integer
319-
description: Env ID of the concerned app
290+
type: string
291+
description: Env Id of the impacted app
320292
names:
321293
type: array
322294
items:
323295
type: string
324-
description: Names of all configmaps/secrets
296+
description: Names of all configmaps/secrets impacted
325297
message:
326298
type: string
327-
description: App-level message for the concerned app
328-
299+
description: Message indicating success or failure of the update
329300
Error:
330-
required:
331-
- code
332-
- message
301+
type: object
333302
properties:
334303
code:
335304
type: integer
336-
description: Error code
305+
description: HTTP status code
337306
message:
338307
type: string
339308
description: Error message

0 commit comments

Comments
 (0)