Explorar o código

Update schemas to prevent invalid properties in deploy.resources

Signed-off-by: Joffrey F <[email protected]>
Joffrey F %!s(int64=8) %!d(string=hai) anos
pai
achega
7611492f9c

+ 2 - 1
compose/config/config_schema_v3.0.json

@@ -240,7 +240,8 @@
           "properties": {
             "limits": {"$ref": "#/definitions/resource"},
             "reservations": {"$ref": "#/definitions/resource"}
-          }
+          },
+          "additionalProperties": false
         },
         "restart_policy": {
           "type": "object",

+ 2 - 1
compose/config/config_schema_v3.1.json

@@ -269,7 +269,8 @@
           "properties": {
             "limits": {"$ref": "#/definitions/resource"},
             "reservations": {"$ref": "#/definitions/resource"}
-          }
+          },
+          "additionalProperties": false
         },
         "restart_policy": {
           "type": "object",

+ 2 - 1
compose/config/config_schema_v3.2.json

@@ -313,7 +313,8 @@
           "properties": {
             "limits": {"$ref": "#/definitions/resource"},
             "reservations": {"$ref": "#/definitions/resource"}
-          }
+          },
+          "additionalProperties": false
         },
         "restart_policy": {
           "type": "object",

+ 2 - 1
compose/config/config_schema_v3.3.json

@@ -348,7 +348,8 @@
           "properties": {
             "limits": {"$ref": "#/definitions/resource"},
             "reservations": {"$ref": "#/definitions/resource"}
-          }
+          },
+          "additionalProperties": false
         },
         "restart_policy": {
           "type": "object",

+ 5 - 2
compose/config/config_schema_v3.4.json

@@ -84,7 +84,9 @@
                 "dockerfile": {"type": "string"},
                 "args": {"$ref": "#/definitions/list_or_dict"},
                 "labels": {"$ref": "#/definitions/list_or_dict"},
-                "cache_from": {"$ref": "#/definitions/list_of_strings"}
+                "cache_from": {"$ref": "#/definitions/list_of_strings"},
+                "network": {"type": "string"},
+                "target": {"type": "string"}
               },
               "additionalProperties": false
             }
@@ -351,7 +353,8 @@
           "properties": {
             "limits": {"$ref": "#/definitions/resource"},
             "reservations": {"$ref": "#/definitions/resource"}
-          }
+          },
+          "additionalProperties": false
         },
         "restart_policy": {
           "type": "object",