Skip to content

Commit 33a6749

Browse files
committed
Sync compose-schemas with upstream (docker/cli)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 5265f63 commit 33a6749

9 files changed

+697
-160
lines changed

compose/config/config_schema_v3.0.json

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"hostname": {"type": "string"},
106106
"image": {"type": "string"},
107107
"ipc": {"type": "string"},
108-
"labels": {"$ref": "#/definitions/labels"},
108+
"labels": {"$ref": "#/definitions/list_or_dict"},
109109
"links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
110110

111111
"logging": {
@@ -223,7 +223,7 @@
223223
"properties": {
224224
"mode": {"type": "string"},
225225
"replicas": {"type": "integer"},
226-
"labels": {"$ref": "#/definitions/labels"},
226+
"labels": {"$ref": "#/definitions/list_or_dict"},
227227
"update_config": {
228228
"type": "object",
229229
"properties": {
@@ -294,7 +294,7 @@
294294
"items": {
295295
"type": "object",
296296
"properties": {
297-
"subnet": {"type": "string", "format": "subnet_ip_address"}
297+
"subnet": {"type": "string"}
298298
},
299299
"additionalProperties": false
300300
}
@@ -310,7 +310,7 @@
310310
"additionalProperties": false
311311
},
312312
"internal": {"type": "boolean"},
313-
"labels": {"$ref": "#/definitions/labels"}
313+
"labels": {"$ref": "#/definitions/list_or_dict"}
314314
},
315315
"additionalProperties": false
316316
},
@@ -333,7 +333,7 @@
333333
},
334334
"additionalProperties": false
335335
},
336-
"labels": {"$ref": "#/definitions/labels"}
336+
"labels": {"$ref": "#/definitions/list_or_dict"}
337337
},
338338
"additionalProperties": false
339339
},
@@ -366,21 +366,6 @@
366366
]
367367
},
368368

369-
"labels": {
370-
"oneOf": [
371-
{
372-
"type": "object",
373-
"patternProperties": {
374-
".+": {
375-
"type": "string"
376-
}
377-
},
378-
"additionalProperties": false
379-
},
380-
{"type": "array", "items": {"type": "string"}, "uniqueItems": true}
381-
]
382-
},
383-
384369
"constraints": {
385370
"service": {
386371
"id": "#/definitions/constraints/service",

compose/config/config_schema_v3.1.json

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"hostname": {"type": "string"},
117117
"image": {"type": "string"},
118118
"ipc": {"type": "string"},
119-
"labels": {"$ref": "#/definitions/labels"},
119+
"labels": {"$ref": "#/definitions/list_or_dict"},
120120
"links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
121121

122122
"logging": {
@@ -252,7 +252,7 @@
252252
"properties": {
253253
"mode": {"type": "string"},
254254
"replicas": {"type": "integer"},
255-
"labels": {"$ref": "#/definitions/labels"},
255+
"labels": {"$ref": "#/definitions/list_or_dict"},
256256
"update_config": {
257257
"type": "object",
258258
"properties": {
@@ -323,7 +323,7 @@
323323
"items": {
324324
"type": "object",
325325
"properties": {
326-
"subnet": {"type": "string", "format": "subnet_ip_address"}
326+
"subnet": {"type": "string"}
327327
},
328328
"additionalProperties": false
329329
}
@@ -339,7 +339,7 @@
339339
"additionalProperties": false
340340
},
341341
"internal": {"type": "boolean"},
342-
"labels": {"$ref": "#/definitions/labels"}
342+
"labels": {"$ref": "#/definitions/list_or_dict"}
343343
},
344344
"additionalProperties": false
345345
},
@@ -362,7 +362,7 @@
362362
},
363363
"additionalProperties": false
364364
},
365-
"labels": {"$ref": "#/definitions/labels"}
365+
"labels": {"$ref": "#/definitions/list_or_dict"}
366366
},
367367
"additionalProperties": false
368368
},
@@ -378,7 +378,7 @@
378378
"name": {"type": "string"}
379379
}
380380
},
381-
"labels": {"$ref": "#/definitions/labels"}
381+
"labels": {"$ref": "#/definitions/list_or_dict"}
382382
},
383383
"additionalProperties": false
384384
},
@@ -411,21 +411,6 @@
411411
]
412412
},
413413

414-
"labels": {
415-
"oneOf": [
416-
{
417-
"type": "object",
418-
"patternProperties": {
419-
".+": {
420-
"type": "string"
421-
}
422-
},
423-
"additionalProperties": false
424-
},
425-
{"type": "array", "items": {"type": "string"}, "uniqueItems": true}
426-
]
427-
},
428-
429414
"constraints": {
430415
"service": {
431416
"id": "#/definitions/constraints/service",

compose/config/config_schema_v3.2.json

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@
7272
"context": {"type": "string"},
7373
"dockerfile": {"type": "string"},
7474
"args": {"$ref": "#/definitions/list_or_dict"},
75-
"labels": {"$ref": "#/definitions/list_or_dict"},
7675
"cache_from": {"$ref": "#/definitions/list_of_strings"}
7776
},
7877
"additionalProperties": false
@@ -118,7 +117,7 @@
118117
"hostname": {"type": "string"},
119118
"image": {"type": "string"},
120119
"ipc": {"type": "string"},
121-
"labels": {"$ref": "#/definitions/labels"},
120+
"labels": {"$ref": "#/definitions/list_or_dict"},
122121
"links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
123122

124123
"logging": {
@@ -245,7 +244,6 @@
245244
{
246245
"type": "object",
247246
"required": ["type"],
248-
"additionalProperties": false,
249247
"properties": {
250248
"type": {"type": "string"},
251249
"source": {"type": "string"},
@@ -264,7 +262,8 @@
264262
"nocopy": {"type": "boolean"}
265263
}
266264
}
267-
}
265+
},
266+
"additionalProperties": false
268267
}
269268
],
270269
"uniqueItems": true
@@ -299,7 +298,7 @@
299298
"mode": {"type": "string"},
300299
"endpoint_mode": {"type": "string"},
301300
"replicas": {"type": "integer"},
302-
"labels": {"$ref": "#/definitions/labels"},
301+
"labels": {"$ref": "#/definitions/list_or_dict"},
303302
"update_config": {
304303
"type": "object",
305304
"properties": {
@@ -370,7 +369,7 @@
370369
"items": {
371370
"type": "object",
372371
"properties": {
373-
"subnet": {"type": "string", "format": "subnet_ip_address"}
372+
"subnet": {"type": "string"}
374373
},
375374
"additionalProperties": false
376375
}
@@ -387,7 +386,7 @@
387386
},
388387
"internal": {"type": "boolean"},
389388
"attachable": {"type": "boolean"},
390-
"labels": {"$ref": "#/definitions/labels"}
389+
"labels": {"$ref": "#/definitions/list_or_dict"}
391390
},
392391
"additionalProperties": false
393392
},
@@ -410,7 +409,7 @@
410409
},
411410
"additionalProperties": false
412411
},
413-
"labels": {"$ref": "#/definitions/labels"}
412+
"labels": {"$ref": "#/definitions/list_or_dict"}
414413
},
415414
"additionalProperties": false
416415
},
@@ -426,7 +425,7 @@
426425
"name": {"type": "string"}
427426
}
428427
},
429-
"labels": {"$ref": "#/definitions/labels"}
428+
"labels": {"$ref": "#/definitions/list_or_dict"}
430429
},
431430
"additionalProperties": false
432431
},
@@ -459,21 +458,6 @@
459458
]
460459
},
461460

462-
"labels": {
463-
"oneOf": [
464-
{
465-
"type": "object",
466-
"patternProperties": {
467-
".+": {
468-
"type": "string"
469-
}
470-
},
471-
"additionalProperties": false
472-
},
473-
{"type": "array", "items": {"type": "string"}, "uniqueItems": true}
474-
]
475-
},
476-
477461
"constraints": {
478462
"service": {
479463
"id": "#/definitions/constraints/service",

compose/config/config_schema_v3.3.json

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"context": {"type": "string"},
8484
"dockerfile": {"type": "string"},
8585
"args": {"$ref": "#/definitions/list_or_dict"},
86-
"labels": {"$ref": "#/definitions/labels"},
86+
"labels": {"$ref": "#/definitions/list_or_dict"},
8787
"cache_from": {"$ref": "#/definitions/list_of_strings"}
8888
},
8989
"additionalProperties": false
@@ -118,10 +118,14 @@
118118
}
119119
},
120120
"container_name": {"type": "string"},
121-
"credential_spec": {"type": "object", "properties": {
122-
"file": {"type": "string"},
123-
"registry": {"type": "string"}
124-
}},
121+
"credential_spec": {
122+
"type": "object",
123+
"properties": {
124+
"file": {"type": "string"},
125+
"registry": {"type": "string"}
126+
},
127+
"additionalProperties": false
128+
},
125129
"depends_on": {"$ref": "#/definitions/list_of_strings"},
126130
"devices": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
127131
"dns": {"$ref": "#/definitions/string_or_list"},
@@ -151,7 +155,7 @@
151155
"hostname": {"type": "string"},
152156
"image": {"type": "string"},
153157
"ipc": {"type": "string"},
154-
"labels": {"$ref": "#/definitions/labels"},
158+
"labels": {"$ref": "#/definitions/list_or_dict"},
155159
"links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
156160

157161
"logging": {
@@ -278,7 +282,6 @@
278282
{
279283
"type": "object",
280284
"required": ["type"],
281-
"additionalProperties": false,
282285
"properties": {
283286
"type": {"type": "string"},
284287
"source": {"type": "string"},
@@ -297,7 +300,8 @@
297300
"nocopy": {"type": "boolean"}
298301
}
299302
}
300-
}
303+
},
304+
"additionalProperties": false
301305
}
302306
],
303307
"uniqueItems": true
@@ -332,7 +336,7 @@
332336
"mode": {"type": "string"},
333337
"endpoint_mode": {"type": "string"},
334338
"replicas": {"type": "integer"},
335-
"labels": {"$ref": "#/definitions/labels"},
339+
"labels": {"$ref": "#/definitions/list_or_dict"},
336340
"update_config": {
337341
"type": "object",
338342
"properties": {
@@ -413,7 +417,7 @@
413417
"items": {
414418
"type": "object",
415419
"properties": {
416-
"subnet": {"type": "string", "format": "subnet_ip_address"}
420+
"subnet": {"type": "string"}
417421
},
418422
"additionalProperties": false
419423
}
@@ -430,7 +434,7 @@
430434
},
431435
"internal": {"type": "boolean"},
432436
"attachable": {"type": "boolean"},
433-
"labels": {"$ref": "#/definitions/labels"}
437+
"labels": {"$ref": "#/definitions/list_or_dict"}
434438
},
435439
"additionalProperties": false
436440
},
@@ -453,7 +457,7 @@
453457
},
454458
"additionalProperties": false
455459
},
456-
"labels": {"$ref": "#/definitions/labels"}
460+
"labels": {"$ref": "#/definitions/list_or_dict"}
457461
},
458462
"additionalProperties": false
459463
},
@@ -469,7 +473,7 @@
469473
"name": {"type": "string"}
470474
}
471475
},
472-
"labels": {"$ref": "#/definitions/labels"}
476+
"labels": {"$ref": "#/definitions/list_or_dict"}
473477
},
474478
"additionalProperties": false
475479
},
@@ -485,7 +489,7 @@
485489
"name": {"type": "string"}
486490
}
487491
},
488-
"labels": {"$ref": "#/definitions/labels"}
492+
"labels": {"$ref": "#/definitions/list_or_dict"}
489493
},
490494
"additionalProperties": false
491495
},
@@ -518,21 +522,6 @@
518522
]
519523
},
520524

521-
"labels": {
522-
"oneOf": [
523-
{
524-
"type": "object",
525-
"patternProperties": {
526-
".+": {
527-
"type": "string"
528-
}
529-
},
530-
"additionalProperties": false
531-
},
532-
{"type": "array", "items": {"type": "string"}, "uniqueItems": true}
533-
]
534-
},
535-
536525
"constraints": {
537526
"service": {
538527
"id": "#/definitions/constraints/service",

0 commit comments

Comments
 (0)