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 63032cb..4a3597a
@@ -40,7 +40,8 @@
             "oneOf": [
               { "$ref": "#/definitions/publisher_http" },
               { "$ref": "#/definitions/publisher_message_router" },
-              { "$ref": "#/definitions/publisher_data_router" }
+              { "$ref": "#/definitions/publisher_data_router" },
+              { "$ref": "#/definitions/publisher_kafka" }
             ]
           }
         },
@@ -51,7 +52,8 @@
             "oneOf": [
               { "$ref": "#/definitions/subscriber_http" },
               { "$ref": "#/definitions/subscriber_message_router" },
-              { "$ref": "#/definitions/subscriber_data_router" }
+              { "$ref": "#/definitions/subscriber_data_router" },
+              { "$ref": "#/definitions/subscriber_kafka" }
             ]
           }
         }
         "type"
       ]
     },
+    "stream_kafka": {
+      "type": "object",
+      "properties": {
+        "format": {
+          "$ref": "#/definitions/name"
+        },
+        "version": {
+          "$ref": "#/definitions/version"
+        },
+        "config_key": {
+          "type": "string"
+        },
+        "type": {
+          "description": "Type of stream to be used",
+          "type": "string",
+          "enum": [
+            "kafka"
+          ]
+        }
+      },
+      "required": [
+        "format",
+        "version",
+        "config_key",
+        "type"
+      ]
+    },
     "publisher_http": {
       "type": "object",
       "properties": {
         "type"
       ]
     },
+    "publisher_kafka": {
+      "$ref": "#/definitions/stream_kafka"
+    },
     "subscriber_http": {
       "type": "object",
       "properties": {
         "config_key"
       ]
     },
+    "subscriber_kafka": {
+      "$ref": "#/definitions/stream_kafka"
+    },
     "provider" : {
       "oneOf" : [
         {"$ref": "#/definitions/docker-provider"},
           "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