This is an automated email from the ASF dual-hosted git repository.

jkevan pushed a commit to branch UNOMI-569-flatten-schemas
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 6608aacd285153980d02bbdd8cff6b8e8b0e4d25
Author: Serge Huber <[email protected]>
AuthorDate: Tue Jun 7 09:36:06 2022 +0200

    UNOMI-569 Flatten schemas
    - Move page and site to top level objects
    - Page and site are now using item as parent validation instead of custom 
item
    - Removed conditiontype JSON schema as it is not needed.
---
 .../META-INF/cxs/schemas/conditiontype.json        | 28 ----------------------
 .../META-INF/cxs/schemas/events/form.json          |  4 ++--
 .../META-INF/cxs/schemas/events/goal.json          |  2 +-
 .../META-INF/cxs/schemas/events/modifyConsent.json |  2 +-
 .../cxs/schemas/{customitems => }/page.json        |  7 +++---
 .../schemas/{customitems => }/page/properties.json |  6 ++---
 .../page/properties/attributes.json                |  2 +-
 .../page/properties/pageInfo.json                  |  2 +-
 .../cxs/schemas/{customitems => }/site.json        |  7 +++---
 .../META-INF/cxs/schemas/articleCompleted.json     |  2 +-
 .../resources/META-INF/cxs/schemas/identify.json   |  2 +-
 11 files changed, 17 insertions(+), 47 deletions(-)

diff --git 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/conditiontype.json
 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/conditiontype.json
deleted file mode 100644
index df255a3aa..000000000
--- 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/conditiontype.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-  "$id": "https://unomi.apache.org/schemas/json/conditiontype/1-0-0";,
-  "$schema": "https://json-schema.org/draft/2019-09/schema";,
-  "self":{
-    "vendor":"The Apache Software Foundation",
-    "name": "conditionType",
-    "format":"jsonschema",
-    "version":"1-0-0"
-  },
-  "title": "ConditionType",
-  "type": "object",
-  "properties" : {
-    "conditionEvaluator" : {
-      "type" : "string"
-    },
-    "queryBuilder" : {
-      "type" : "string"
-    },
-    "parentCondition" : {
-      "$ref" : "https://unomi.apache.org/schemas/json/condition/1-0-0";
-    },
-    "parameters" : {
-      "type" : "object",
-      "additionalProperties": { "$ref" : 
"https://unomi.apache.org/schemas/json/parameter/1-0-0"; },
-      "maxProperties": 50
-    }
-  }
-}
\ No newline at end of file
diff --git 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/form.json
 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/form.json
index 6b4ada182..c537eec11 100644
--- 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/form.json
+++ 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/form.json
@@ -13,10 +13,10 @@
   "allOf": [{ "$ref": "https://unomi.apache.org/schemas/json/event/1-0-0"; }],
   "properties" : {
     "source" : {
-      "$ref" : "https://unomi.apache.org/schemas/json/customitems/site/1-0-0";
+      "$ref" : "https://unomi.apache.org/schemas/json/items/site/1-0-0";
     },
     "target" : {
-      "$ref" : "https://unomi.apache.org/schemas/json/customitems/page/1-0-0";
+      "$ref" : "https://unomi.apache.org/schemas/json/items/page/1-0-0";
     }
   },
   "unevaluatedProperties" : false
diff --git 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/goal.json
 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/goal.json
index 31c41ac8f..d6f9b6af0 100644
--- 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/goal.json
+++ 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/goal.json
@@ -13,7 +13,7 @@
   "allOf": [{ "$ref": "https://unomi.apache.org/schemas/json/event/1-0-0"; }],
   "properties" : {
     "source" : {
-      "$ref" : "https://unomi.apache.org/schemas/json/customitems/page/1-0-0";
+      "$ref" : "https://unomi.apache.org/schemas/json/items/page/1-0-0";
     },
     "target" : {
       "$ref" : "https://unomi.apache.org/schemas/json/goal/1-0-0";
diff --git 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/modifyConsent.json
 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/modifyConsent.json
index 971e61aae..14db8d7fe 100644
--- 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/modifyConsent.json
+++ 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/modifyConsent.json
@@ -16,7 +16,7 @@
       "$ref" : 
"https://unomi.apache.org/schemas/json/events/modifyConsent/properties/1-0-0";
     },
     "source" : {
-        "$ref" : "https://unomi.apache.org/schemas/json/customitems/page/1-0-0";
+        "$ref" : "https://unomi.apache.org/schemas/json/items/page/1-0-0";
     },
     "target" : {
         "$ref" : "https://unomi.apache.org/schemas/json/consent/1-0-0";
diff --git 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page.json
 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page.json
similarity index 57%
rename from 
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page.json
rename to 
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page.json
index f22f83d1a..a11bbae43 100644
--- 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page.json
+++ 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page.json
@@ -1,9 +1,8 @@
 {
-  "$id": "https://unomi.apache.org/schemas/json/customitems/page/1-0-0";,
+  "$id": "https://unomi.apache.org/schemas/json/items/page/1-0-0";,
   "$schema": "https://json-schema.org/draft/2019-09/schema";,
   "self":{
     "vendor":"The Apache Software Foundation",
-    "target" : "customitems",
     "name":"page",
     "format":"jsonschema",
     "version":"1-0-0"
@@ -12,12 +11,12 @@
   "type": "object",
   "allOf": [
     {
-      "$ref": "https://unomi.apache.org/schemas/json/customitem/1-0-0";
+      "$ref": "https://unomi.apache.org/schemas/json/item/1-0-0";
     }
   ],
   "properties": {
     "properties" : {
-      "$ref" : 
"https://unomi.apache.org/schemas/json/customitems/page/properties/1-0-0";
+      "$ref" : 
"https://unomi.apache.org/schemas/json/items/page/properties/1-0-0";
     }
   },
   "unevaluatedProperties" : false
diff --git 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties.json
 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page/properties.json
similarity index 64%
rename from 
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties.json
rename to 
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page/properties.json
index 82300bac1..36092791d 100644
--- 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties.json
+++ 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page/properties.json
@@ -1,5 +1,5 @@
 {
-  "$id": 
"https://unomi.apache.org/schemas/json/customitems/page/properties/1-0-0";,
+  "$id": "https://unomi.apache.org/schemas/json/items/page/properties/1-0-0";,
   "$schema": "https://json-schema.org/draft/2019-09/schema";,
   "self":{
     "vendor":"The Apache Software Foundation",
@@ -11,10 +11,10 @@
   "type": "object",
   "properties": {
     "pageInfo": {
-      "$ref" : 
"https://unomi.apache.org/schemas/json/customitems/page/properties/pageInfo/1-0-0";
+      "$ref" : 
"https://unomi.apache.org/schemas/json/items/page/properties/pageInfo/1-0-0";
     },
     "attributes": {
-      "$ref" : 
"https://unomi.apache.org/schemas/json/customitems/page/properties/attributes/1-0-0";
+      "$ref" : 
"https://unomi.apache.org/schemas/json/items/page/properties/attributes/1-0-0";
     },
     "consentTypes": {
       "type" : ["null", "array"],
diff --git 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties/attributes.json
 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page/properties/attributes.json
similarity index 76%
rename from 
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties/attributes.json
rename to 
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page/properties/attributes.json
index 62d5cc22b..cb54c2a93 100644
--- 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties/attributes.json
+++ 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page/properties/attributes.json
@@ -1,5 +1,5 @@
 {
-  "$id": 
"https://unomi.apache.org/schemas/json/customitems/page/properties/attributes/1-0-0";,
+  "$id": 
"https://unomi.apache.org/schemas/json/items/page/properties/attributes/1-0-0";,
   "$schema": "https://json-schema.org/draft/2019-09/schema";,
   "self": {
     "vendor": "org.apache.unomi",
diff --git 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties/pageInfo.json
 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page/properties/pageInfo.json
similarity index 91%
rename from 
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties/pageInfo.json
rename to 
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page/properties/pageInfo.json
index a0f0b465b..2cce0649f 100644
--- 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties/pageInfo.json
+++ 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/page/properties/pageInfo.json
@@ -1,5 +1,5 @@
 {
-  "$id": 
"https://unomi.apache.org/schemas/json/customitems/page/properties/pageInfo/1-0-0";,
+  "$id": 
"https://unomi.apache.org/schemas/json/items/page/properties/pageInfo/1-0-0";,
   "$schema": "https://json-schema.org/draft/2019-09/schema";,
   "self": {
     "vendor": "org.apache.unomi",
diff --git 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/site.json
 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/site.json
similarity index 57%
rename from 
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/site.json
rename to 
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/site.json
index d3246be1f..4aa93a6db 100644
--- 
a/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/site.json
+++ 
b/extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/site.json
@@ -1,18 +1,17 @@
 {
-  "$id": "https://unomi.apache.org/schemas/json/customitems/site/1-0-0";,
+  "$id": "https://unomi.apache.org/schemas/json/items/site/1-0-0";,
   "$schema": "https://json-schema.org/draft/2019-09/schema";,
   "self":{
     "vendor":"The Apache Software Foundation",
-    "target" : "customitems",
     "name": "site",
     "format":"jsonschema",
     "version":"1-0-0"
   },
-  "title": "SiteCustomItem",
+  "title": "SiteItem",
   "type": "object",
   "allOf": [
     {
-      "$ref": "https://unomi.apache.org/schemas/json/customitem/1-0-0";
+      "$ref": "https://unomi.apache.org/schemas/json/item/1-0-0";
     }
   ],
   "unevaluatedProperties" : false
diff --git 
a/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/articleCompleted.json
 
b/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/articleCompleted.json
index b8d5bbabd..90e5c5d86 100644
--- 
a/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/articleCompleted.json
+++ 
b/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/articleCompleted.json
@@ -16,7 +16,7 @@
       "$ref" : 
"https://unomi.apache.org/schemas/json/events/articleCompleted/properties/1-0-0";
     },
     "source" : {
-      "$ref" : "https://unomi.apache.org/schemas/json/customitems/page/1-0-0";
+      "$ref" : "https://unomi.apache.org/schemas/json/items/page/1-0-0";
     },
     "target" : {
       "$ref" : "https://unomi.apache.org/schemas/json/customitem/1-0-0";
diff --git 
a/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/identify.json
 
b/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/identify.json
index 754cca17b..f9e41fc63 100644
--- 
a/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/identify.json
+++ 
b/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/identify.json
@@ -16,7 +16,7 @@
       "$ref" : 
"https://unomi.apache.org/schemas/json/events/identify/properties/1-0-0";
     },
     "source" : {
-      "$ref" : "https://unomi.apache.org/schemas/json/customitems/page/1-0-0";
+      "$ref" : "https://unomi.apache.org/schemas/json/items/page/1-0-0";
     },
     "target" : {
       "$ref" : "https://unomi.apache.org/schemas/json/customitem/1-0-0";

Reply via email to