Fix Failed validating 'oneOf' in schema[1]['properties']['volumes']['items'] in compo...
[dcaegen2/platform.git] / mod / component-json-schemas / component-specification / dcae-cli-v2 / component-spec-schema.json
old mode 100644 (file)
new mode 100755 (executable)
index 7d576c0..4a3597a
           "type": "array",
           "items": {
             "type": "object",
-            "properties": {
-              "host":{
-                "type":"object",
-                "path": {"type": "string"}
-              },
-              "container":{
-                "type":"object",
-                "bind": { "type": "string"},
-                "mode": { "type": "string"}
-              }
-            }
+            "oneOf": [
+              { "$ref": "#/definitions/host_path_volume" },
+              { "$ref": "#/definitions/config_map_volume" }
+            ]
           }
         }
       },
       ],
       "additionalProperties": false
     },
+    "host_path_volume": {
+      "type": "object",
+      "properties": {
+        "host": {
+          "type": "object",
+          "path": {
+            "type": "string"
+          }
+        },
+        "container": {
+          "type": "object",
+          "bind": {
+            "type": "string"
+          },
+          "mode": {
+            "type": "string"
+          }
+        }
+      },
+      "required": ["host", "container"]
+    },
+    "config_map_volume": {
+      "type": "object",
+      "properties": {
+        "config_volume": {
+          "type": "object",
+          "name": {
+            "type": "string"
+          }
+        },
+        "container": {
+          "type": "object",
+          "bind": {
+            "type": "string"
+          },
+          "mode": {
+            "type": "string"
+          }
+        }
+      },
+      "required": ["config_volume", "container"]
+    },
     "docker_healthcheck_http": {
       "properties": {
         "type": {
       ]
     }
   }
-}
+}
\ No newline at end of file