From 012fa9096b4f5244ee54bc76836ea1f94ad77bf7 Mon Sep 17 00:00:00 2001 From: OKEAMAH Date: Sat, 10 Aug 2024 00:37:10 +0000 Subject: [PATCH] Update compose-spec.json Signed-off-by: GitHub --- schema/compose-spec.json | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/schema/compose-spec.json b/schema/compose-spec.json index 69bbfcc2..335cbe09 100644 --- a/schema/compose-spec.json +++ b/schema/compose-spec.json @@ -155,8 +155,8 @@ }, "additionalProperties": false }, - "cap_add": {"type": "array", "items": {"type": "string"}}, - "cap_drop": {"type": "array", "items": {"type": "string"}}, + "cap_add": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, + "cap_drop": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, "cgroup": {"type": "string", "enum": ["host", "private"]}, "cgroup_parent": {"type": "string"}, "command": {"$ref": "#/definitions/command"}, @@ -197,6 +197,7 @@ "^[a-zA-Z0-9._-]+$": { "type": "object", "additionalProperties": false, + "patternProperties": {"^x-": {}}, "properties": { "restart": {"type": ["boolean", "string"]}, "required": { @@ -215,9 +216,9 @@ ] }, "device_cgroup_rules": {"$ref": "#/definitions/list_of_strings"}, - "devices": {"type": "array", "items": {"type": "string"}}, + "devices": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, "dns": {"$ref": "#/definitions/string_or_list"}, - "dns_opt": {"type": "array","items": {"type": "string"}}, + "dns_opt": {"type": "array","items": {"type": "string"}, "uniqueItems": true}, "dns_search": {"$ref": "#/definitions/string_or_list"}, "domainname": {"type": "string"}, "entrypoint": {"$ref": "#/definitions/command"}, @@ -229,7 +230,8 @@ "items": { "type": ["string", "number"], "format": "expose" - } + }, + "uniqueItems": true }, "extends": { "oneOf": [ @@ -246,13 +248,14 @@ } ] }, - "external_links": {"type": "array", "items": {"type": "string"}}, + "external_links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, "extra_hosts": {"$ref": "#/definitions/list_or_dict"}, "group_add": { "type": "array", "items": { "type": ["string", "number"] - } + }, + "uniqueItems": true }, "healthcheck": {"$ref": "#/definitions/healthcheck"}, "hostname": {"type": "string"}, @@ -261,7 +264,7 @@ "ipc": {"type": "string"}, "isolation": {"type": "string"}, "labels": {"$ref": "#/definitions/list_or_dict"}, - "links": {"type": "array", "items": {"type": "string"}}, + "links": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, "logging": { "type": "object", @@ -347,7 +350,8 @@ "patternProperties": {"^x-": {}} } ] - } + }, + "uniqueItems": true }, "privileged": {"type": ["boolean", "string"]}, "profiles": {"$ref": "#/definitions/list_of_strings"}, @@ -362,7 +366,7 @@ "scale": { "type": ["integer", "string"] }, - "security_opt": {"type": "array", "items": {"type": "string"}}, + "security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, "shm_size": {"type": ["number", "string"]}, "secrets": {"$ref": "#/definitions/service_config_or_secret"}, "sysctls": {"$ref": "#/definitions/list_or_dict"}, @@ -428,11 +432,13 @@ "patternProperties": {"^x-": {}} } ] - } + }, + "uniqueItems": true }, "volumes_from": { "type": "array", - "items": {"type": "string"} + "items": {"type": "string"}, + "uniqueItems": true }, "working_dir": {"type": "string"} }, @@ -474,7 +480,9 @@ "path": {"type": "string"}, "action": {"type": "string", "enum": ["rebuild", "sync", "sync+restart"]}, "target": {"type": "string"} - } + }, + "additionalProperties": false, + "patternProperties": {"^x-": {}} }, "additionalProperties": false, "patternProperties": {"^x-": {}} @@ -827,7 +835,8 @@ "list_of_strings": { "type": "array", - "items": {"type": "string"} + "items": {"type": "string"}, + "uniqueItems": true }, "list_or_dict": { @@ -841,7 +850,7 @@ }, "additionalProperties": false }, - {"type": "array", "items": {"type": "string"}} + {"type": "array", "items": {"type": "string"}, "uniqueItems": true} ] },