From 5edd793d5bd7ddbfccd113085d21b37fbba83fa4 Mon Sep 17 00:00:00 2001
From: Thomas Schmidt <somtom91@gmail.com>
Date: Thu, 29 Aug 2024 17:38:10 +0200
Subject: [PATCH] Minor schema fixes before pushing to Snowcat Cloud (#47403)

---
 .../com.metabase/account/jsonschema/1-0-2     |   2 +-
 .../com.metabase/dashboard/jsonschema/1-1-5   |   2 +-
 .../com.metabase/embed_flow/jsonschema/1-0-2  |   2 +-
 .../embedding_homepage/jsonschema/1-0-0       |  14 +-
 .../serialization/jsonschema/1-0-0            | 191 ++++++++++-------
 .../serialization/jsonschema/1-0-1            | 200 +++++++++++-------
 .../com.metabase/upsell/jsonschema/1-0-0      |   2 +-
 7 files changed, 259 insertions(+), 154 deletions(-)

diff --git a/snowplow/iglu-client-embedded/schemas/com.metabase/account/jsonschema/1-0-2 b/snowplow/iglu-client-embedded/schemas/com.metabase/account/jsonschema/1-0-2
index 0276a42921b..8c852a1580e 100644
--- a/snowplow/iglu-client-embedded/schemas/com.metabase/account/jsonschema/1-0-2
+++ b/snowplow/iglu-client-embedded/schemas/com.metabase/account/jsonschema/1-0-2
@@ -14,7 +14,7 @@
       "type": "string",
       "enum": [
         "new_user_created",
-        "new_instance_created",
+        "new_instance_created"
       ],
       "maxLength": 1024
     },
diff --git a/snowplow/iglu-client-embedded/schemas/com.metabase/dashboard/jsonschema/1-1-5 b/snowplow/iglu-client-embedded/schemas/com.metabase/dashboard/jsonschema/1-1-5
index bdd11373389..8a8a749b11b 100644
--- a/snowplow/iglu-client-embedded/schemas/com.metabase/dashboard/jsonschema/1-1-5
+++ b/snowplow/iglu-client-embedded/schemas/com.metabase/dashboard/jsonschema/1-1-5
@@ -5,7 +5,7 @@
     "vendor": "com.metabase",
     "name": "dashboard",
     "format": "jsonschema",
-    "version": "1-1-4"
+    "version": "1-1-5"
   },
   "type": "object",
   "properties": {
diff --git a/snowplow/iglu-client-embedded/schemas/com.metabase/embed_flow/jsonschema/1-0-2 b/snowplow/iglu-client-embedded/schemas/com.metabase/embed_flow/jsonschema/1-0-2
index d5844259860..2c6329c36e4 100644
--- a/snowplow/iglu-client-embedded/schemas/com.metabase/embed_flow/jsonschema/1-0-2
+++ b/snowplow/iglu-client-embedded/schemas/com.metabase/embed_flow/jsonschema/1-0-2
@@ -5,7 +5,7 @@
     "vendor": "com.metabase",
     "name": "embed_flow",
     "format": "jsonschema",
-    "version": "1-0-1"
+    "version": "1-0-2"
   },
   "type": "object",
   "properties": {
diff --git a/snowplow/iglu-client-embedded/schemas/com.metabase/embedding_homepage/jsonschema/1-0-0 b/snowplow/iglu-client-embedded/schemas/com.metabase/embedding_homepage/jsonschema/1-0-0
index bea082b6e16..0d02fb11299 100644
--- a/snowplow/iglu-client-embedded/schemas/com.metabase/embedding_homepage/jsonschema/1-0-0
+++ b/snowplow/iglu-client-embedded/schemas/com.metabase/embedding_homepage/jsonschema/1-0-0
@@ -3,7 +3,7 @@
   "description": "User interactions with the embedding-homepage",
   "self": {
     "vendor": "com.metabase",
-    "name": "embedding-homepage",
+    "name": "embedding_homepage",
     "format": "jsonschema",
     "version": "1-0-0"
   },
@@ -19,7 +19,10 @@
       "description": "The type of event being recorded."
     },
     "dismiss_reason": {
-      "type": "string",
+      "type":  [
+        "string", 
+        "null"
+      ],
       "enum": [
         "dismissed-done",
         "dismissed-run-into-issues",
@@ -28,7 +31,10 @@
       "description": "The reason the user dismissed the homepage."
     },
     "initial_tab": {
-      "type": "string",
+      "type": [
+        "string", 
+        "null"
+      ],
       "enum": [
         "static",
         "interactive"
@@ -40,4 +46,4 @@
     "event"
   ],
   "additionalProperties": false
-}
\ No newline at end of file
+}
diff --git a/snowplow/iglu-client-embedded/schemas/com.metabase/serialization/jsonschema/1-0-0 b/snowplow/iglu-client-embedded/schemas/com.metabase/serialization/jsonschema/1-0-0
index ea36cd8ca7a..ca3efcca09d 100644
--- a/snowplow/iglu-client-embedded/schemas/com.metabase/serialization/jsonschema/1-0-0
+++ b/snowplow/iglu-client-embedded/schemas/com.metabase/serialization/jsonschema/1-0-0
@@ -1,74 +1,121 @@
 {
-  "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
-  "description": "Serialization operation",
-  "self": {
-    "vendor": "com.metabase",
-    "name": "database",
-    "format": "jsonschema",
-    "version": "1-0-0"
-  },
-  "type": "object",
-  "required": ["event", "source", "duration", "success"],
-  "properties": {
-    "event": {
-      "description": "Event name",
-      "type": "string",
-      "enum": ["serialization"],
-      "maxLength": 1024
-    },
-    "direction": {
-      "description": "Is it import or export",
-      "type": "string"
-      "enum": ["import", "export"],
-      "maxLength": 6
-    },
-    "source": {
-      "description": "The way serialization was triggered",
-      "type": "string",
-      "enum": ["cli", "api"]
-    },
-    "duration_ms": {
-      "description": "Time in milliseconds it took to execute",
-      "type": "integer"
-    },
-    "success": {
-      "description": "If serialization succeeded or failed",
-      "type": "boolean"
-    },
-    "error_message": {
-      "description": "Why serialization failed",
-      "type": "string",
-      "maxLength": 1024
-    },
-    "count": {
-      "description": "Total count of serialized entities",
-      "type": "integer"
-    },
-    "models": {
-      "description": "Which models were imported",
-      "type": "string",
-      "maxLength": 1024
-    },
-    "collection": {
-      "description": "Which collections were exported",
-      "type": ["string", "null"],
-      "maxLength": 1024
-    },
-    "all_collections": {
-      "description": "If all collections were exported",
-      "type": "boolean"
-    },
-    "settings": {
-      "description": "If settings were exported",
-      "type": "boolean"
-    },
-    "field_values": {
-      "description": "If field values were exported",
-      "type": "boolean"
-    },
-    "secrets": {
-      "description": "If database secrets were included in export",
-      "type": "boolean"
-    }
-  }
+   "$schema":"http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
+   "description":"Serialization operation",
+   "self":{
+      "vendor":"com.metabase",
+      "name":"serialization",
+      "format":"jsonschema",
+      "version":"1-0-0"
+   },
+   "type":"object",
+   "required":[
+      "event",
+      "source",
+      "duration",
+      "success"
+   ],
+   "properties":{
+      "event":{
+         "description":"Event name",
+         "type":"string",
+         "enum":[
+            "serialization"
+         ],
+         "maxLength":1024
+      },
+      "direction":{
+         "description":"Is it import or export",
+         "type":[
+            "string",
+            "null"
+         ],
+         "enum":[
+            "import",
+            "export"
+         ],
+         "maxLength":6
+      },
+      "source":{
+         "description":"The way serialization was triggered",
+         "type":"string",
+         "enum":[
+            "cli",
+            "api"
+         ]
+      },
+      "duration_ms":{
+         "description":"Time in milliseconds it took to execute",
+         "type":[
+            "integer",
+            "null"
+         ],
+         "minimum": 0,
+         "maximum": 2147483647
+      },
+      "success":{
+         "description":"If serialization succeeded or failed",
+         "type":"boolean"
+      },
+      "error_message":{
+         "description":"Why serialization failed",
+         "type":[
+            "string",
+            "null"
+         ],
+         "maxLength":1024
+      },
+      "count":{
+         "description":"Total count of serialized entities",
+         "type":[
+            "integer",
+            "null"
+         ],
+         "minimum": 0,
+         "maximum": 2147483647
+      },
+      "models":{
+         "description":"Which models were imported",
+         "type":[
+            "string",
+            "null"
+         ],
+         "maxLength":1024
+      },
+      "collection":{
+         "description":"Which collections were exported",
+         "type":[
+            "string",
+            "null"
+         ],
+         "maxLength":1024
+      },
+      "all_collections":{
+         "description":"If all collections were exported",
+         "type":[
+            "boolean",
+            "null"
+         ]
+      },
+      "settings":{
+         "description":"If settings were exported",
+         "type":[
+            "boolean",
+            "null"
+         ]
+      },
+      "field_values":{
+         "description":"If field values were exported",
+         "type":[
+            "boolean",
+            "null"
+         ]
+      },
+      "secrets":{
+         "description":"If database secrets were included in export",
+         "type":[
+            "boolean",
+            "null"
+         ]
+      }
+   }
 }
diff --git a/snowplow/iglu-client-embedded/schemas/com.metabase/serialization/jsonschema/1-0-1 b/snowplow/iglu-client-embedded/schemas/com.metabase/serialization/jsonschema/1-0-1
index 42dcb191f84..9ec4c885a4b 100644
--- a/snowplow/iglu-client-embedded/schemas/com.metabase/serialization/jsonschema/1-0-1
+++ b/snowplow/iglu-client-embedded/schemas/com.metabase/serialization/jsonschema/1-0-1
@@ -1,78 +1,130 @@
 {
-  "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
-  "description": "Serialization operation",
-  "self": {
-    "vendor": "com.metabase",
-    "name": "database",
-    "format": "jsonschema",
-    "version": "1-0-1"
-  },
-  "type": "object",
-  "required": ["event", "source", "duration", "success"],
-  "properties": {
-    "event": {
-      "description": "Event name",
-      "type": "string",
-      "enum": ["serialization"],
-      "maxLength": 1024
+    "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
+    "description": "Serialization operation",
+    "self": {
+        "vendor": "com.metabase",
+        "name": "serialization",
+        "format": "jsonschema",
+        "version": "1-0-0"
     },
-    "direction": {
-      "description": "Is it import or export",
-      "type": "string"
-      "enum": ["import", "export"],
-      "maxLength": 6
-    },
-    "source": {
-      "description": "The way serialization was triggered",
-      "type": "string",
-      "enum": ["cli", "api"]
-    },
-    "duration_ms": {
-      "description": "Time in milliseconds it took to execute",
-      "type": "integer"
-    },
-    "success": {
-      "description": "If serialization succeeded or failed",
-      "type": "boolean"
-    },
-    "error_message": {
-      "description": "Why serialization failed",
-      "type": "string",
-      "maxLength": 1024
-    },
-    "count": {
-      "description": "Total count of serialized entities",
-      "type": "integer"
-    },
-    "error_count": {
-      "description": "Number of errors occured during serialization (if they were skipped)",
-      "type": "integer"
-    },
-    "models": {
-      "description": "Which models were imported",
-      "type": "string",
-      "maxLength": 1024
-    },
-    "collection": {
-      "description": "Which collections were exported",
-      "type": ["string", "null"],
-      "maxLength": 1024
-    },
-    "all_collections": {
-      "description": "If all collections were exported",
-      "type": "boolean"
-    },
-    "settings": {
-      "description": "If settings were exported",
-      "type": "boolean"
-    },
-    "field_values": {
-      "description": "If field values were exported",
-      "type": "boolean"
-    },
-    "secrets": {
-      "description": "If database secrets were included in export",
-      "type": "boolean"
+    "type": "object",
+    "required": [
+        "event",
+        "source",
+        "duration",
+        "success"
+    ],
+    "properties": {
+        "event": {
+            "description": "Event name",
+            "type": "string",
+            "enum": [
+                "serialization"
+            ],
+            "maxLength": 1024
+        },
+        "direction": {
+            "description": "Is it import or export",
+            "type": [
+                "string",
+                "null"
+            ],
+            "enum": [
+                "import",
+                "export"
+            ],
+            "maxLength": 6
+        },
+        "source": {
+            "description": "The way serialization was triggered",
+            "type": "string",
+            "enum": [
+                "cli",
+                "api"
+            ]
+        },
+        "duration_ms": {
+            "description": "Time in milliseconds it took to execute",
+            "type": [
+                "integer",
+                "null"
+            ],
+            "minimum": 0,
+            "maximum": 2147483647
+        },
+        "success": {
+            "description": "If serialization succeeded or failed",
+            "type": "boolean"
+        },
+        "error_message": {
+            "description": "Why serialization failed",
+            "type": [
+                "string",
+                "null"
+            ],
+            "maxLength": 1024
+        },
+        "count": {
+            "description": "Total count of serialized entities",
+            "type": [
+                "integer",
+                "null"
+            ],
+            "minimum": 0,
+            "maximum": 2147483647
+        },
+        "error_count": {
+            "description": "Number of errors occured during serialization (if they were skipped)",
+            "type": [
+                "integer",
+                "null"
+            ],
+            "minimum": 0,
+            "maximum": 2147483647
+        },
+        "models": {
+            "description": "Which models were imported",
+            "type": [
+                "string",
+                "null"
+            ],
+            "maxLength": 1024
+        },
+        "collection": {
+            "description": "Which collections were exported",
+            "type": [
+                "string",
+                "null"
+            ],
+            "maxLength": 1024
+        },
+        "all_collections": {
+            "description": "If all collections were exported",
+            "type": [
+                "boolean",
+                "null"
+            ]
+        },
+        "settings": {
+            "description": "If settings were exported",
+            "type": [
+                "boolean",
+                "null"
+            ]
+        },
+        "field_values": {
+            "description": "If field values were exported",
+            "type": [
+                "boolean",
+                "null"
+            ]
+        },
+        "secrets": {
+            "description": "If database secrets were included in export",
+            "type": [
+                "boolean",
+                "null"
+            ]
+        }
     }
-  }
 }
diff --git a/snowplow/iglu-client-embedded/schemas/com.metabase/upsell/jsonschema/1-0-0 b/snowplow/iglu-client-embedded/schemas/com.metabase/upsell/jsonschema/1-0-0
index 7104f09a23b..56cd53c3f7e 100644
--- a/snowplow/iglu-client-embedded/schemas/com.metabase/upsell/jsonschema/1-0-0
+++ b/snowplow/iglu-client-embedded/schemas/com.metabase/upsell/jsonschema/1-0-0
@@ -3,7 +3,7 @@
   "description": "Upsell events",
   "self": {
     "vendor": "com.metabase",
-    "name": "settings",
+    "name": "upsell",
     "format": "jsonschema",
     "version": "1-0-0"
   },
-- 
GitLab