Add support for config_volume in blueprint generator
[dcaegen2/platform.git] / mod / component-json-schemas / component-specification / dcae-cli-v2 / component-spec-schema.json
index 7d576c0..56dbf3a 100644 (file)
           "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"
+          }
+        }
+      }
+    },
+    "config_map_volume": {
+      "type": "object",
+      "properties": {
+        "config_volume": {
+          "type": "object",
+          "name": {
+            "type": "string"
+          }
+        },
+        "container": {
+          "type": "object",
+          "bind": {
+            "type": "string"
+          },
+          "mode": {
+            "type": "string"
+          }
+        }
+      }
+    },
     "docker_healthcheck_http": {
       "properties": {
         "type": {