You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by GitBox <gi...@apache.org> on 2022/05/25 17:12:31 UTC

[GitHub] [unomi] sergehuber opened a new pull request, #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

sergehuber opened a new pull request, #428:
URL: https://github.com/apache/unomi/pull/428

   - All schemas are now "flattened", meaning that each object is in a separate schema file (with a few exceptions)
   - Bug fixes in GraphQLSchemaProvider to detect loops in schemas
   - Fix events used in integration tests to avoid sending profile objects
   - Changed Event default initialization to avoid creating attributes when using default constructor
   - Added JAXBAnnotationModule in object mapper used in integration tests
   - Added system property to control logging in integration tests (to make it easier to see invalid schema logs that exist only in debug)
   - Fix deployment of test schemas in integration tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] jkevan commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
jkevan commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r894486700


##########
itests/src/test/java/org/apache/unomi/itests/BasicIT.java:
##########
@@ -39,6 +39,7 @@
 import org.apache.unomi.api.services.RulesService;
 import org.apache.unomi.itests.tools.httpclient.HttpClientThatWaitsForUnomi;
 import org.apache.unomi.persistence.spi.CustomObjectMapper;
+import org.apache.unomi.schema.api.SchemaService;

Review Comment:
   True, I will remove it. Thx !



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] sergehuber commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
sergehuber commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r888946868


##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page.json:
##########
@@ -16,58 +16,9 @@
     }
   ],

Review Comment:
   Ok I will use the item instead of customitem as discussed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] jkevan merged pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
jkevan merged PR #428:
URL: https://github.com/apache/unomi/pull/428


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] jkevan commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
jkevan commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r886399954


##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties/pageInfo.json:
##########
@@ -0,0 +1,58 @@
+{
+  "$id": "https://unomi.apache.org/schemas/json/customitems/page/properties/pageInfo/1-0-0",
+  "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self": {
+    "vendor": "org.apache.unomi",
+    "name": "pageInfo",
+    "format": "jsonschema",
+    "version": "1-0-0"
+  },

Review Comment:
   I wonder if all the page view related schemas should not be part of jExperience instead of Unomi core.
   Since this event is triggered and sent by jExp. also jExp does contains specific rules on the page view event like:
   incrementPageViewCount.



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/site.json:
##########
@@ -2,7 +2,7 @@
   "$id": "https://unomi.apache.org/schemas/json/customitems/site/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "self":{
-    "vendor":"org.apache.unomi",
+    "vendor":"The Apache Software Foundation",

Review Comment:
   I think this JSON schema would be better in JExp



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/values/boolean.json:
##########
@@ -1,6 +1,13 @@
 {
   "$id": "https://unomi.apache.org/schemas/json/values/boolean/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self":{
+    "vendor":"The Apache Software Foundation",
+    "target" : "values",
+    "name": "boolean",
+    "format":"jsonschema",
+    "version":"1-0-0"
+  },

Review Comment:
   do we still need this schemas on values type ?



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/metadata.json:
##########
@@ -1,6 +1,12 @@
 {
   "$id": "https://unomi.apache.org/schemas/json/metadata/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self":{
+    "vendor":"The Apache Software Foundation",
+    "name": "metadata",
+    "format":"jsonschema",
+    "version":"1-0-0"
+  },

Review Comment:
   This JSON Schema is not requried and should be remove.



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/view.json:
##########
@@ -2,7 +2,7 @@
   "$id": "https://unomi.apache.org/schemas/json/events/view/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "self":{
-    "vendor":"org.apache.unomi",
+    "vendor":"The Apache Software Foundation",

Review Comment:
   Could be part of jExperience schemas ?



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/updateProperties.json:
##########
@@ -2,7 +2,7 @@
   "$id": "https://unomi.apache.org/schemas/json/events/updateProperties/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "self":{
-    "vendor":"org.apache.unomi",
+    "vendor":"The Apache Software Foundation",

Review Comment:
   May be we could add a comment on this schema to explain why it is open. Because of thirdparty server key check.



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/values/email.json:
##########
@@ -1,6 +1,13 @@
 {
     "$id": "https://unomi.apache.org/schemas/json/values/email/1-0-0",
     "$schema": "https://json-schema.org/draft/2019-09/schema",
+    "self":{
+        "vendor":"The Apache Software Foundation",
+        "target" : "values",
+        "name": "email",
+        "format":"jsonschema",
+        "version":"1-0-0"
+    },

Review Comment:
   do we still need this schemas on values type ?



##########
extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/identify/properties.json:
##########
@@ -0,0 +1,24 @@
+{
+  "$id": "https://unomi.apache.org/schemas/json/events/identify/properties/1-0-0",
+  "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self": {
+    "vendor": "org.apache.unomi",
+    "target": "events",
+    "name": "identifyProperties",
+    "format": "jsonschema",
+    "version": "1-0-0"
+  },
+  "title": "IdentifyProperties",
+  "type": "object",
+  "properties": {
+    "nickname": {
+      "type": "string"
+    },
+    "favoriteCompiler": {
+      "type": "string"
+    },
+    "industry": {
+      "type": "string"
+    }
+  }

Review Comment:
   Careful, this schema doesn't contains "unevaluatedProperty:false", so it could produce mapping explosion



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/form.json:
##########
@@ -2,7 +2,7 @@
   "$id": "https://unomi.apache.org/schemas/json/events/form/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "self":{
-    "vendor":"org.apache.unomi",
+    "vendor":"The Apache Software Foundation",

Review Comment:
   I think this JSON schema would be better in JExp



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/goal.json:
##########
@@ -2,7 +2,7 @@
   "$id": "https://unomi.apache.org/schemas/json/events/goal/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "self":{
-    "vendor":"org.apache.unomi",
+    "vendor":"The Apache Software Foundation",

Review Comment:
   Goal event are triggered by the system, I dont think we want this event to be open to public event for security reason I think we should get rid of it.



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/values/integer.json:
##########
@@ -1,6 +1,13 @@
 {
     "$id": "https://unomi.apache.org/schemas/json/values/integer/1-0-0",
     "$schema": "https://json-schema.org/draft/2019-09/schema",
+    "self":{
+        "vendor":"The Apache Software Foundation",
+        "target" : "values",
+        "name": "integer",
+        "format":"jsonschema",
+        "version":"1-0-0"
+    },

Review Comment:
   do we still need this schemas on values type ?



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/site.json:
##########
@@ -15,6 +15,5 @@
       "$ref": "https://unomi.apache.org/schemas/json/customitem/1-0-0"

Review Comment:
   I think this object is not a custom item



##########
extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/articleCompleted/properties.json:
##########
@@ -0,0 +1,22 @@
+{
+  "$id": "https://unomi.apache.org/schemas/json/events/articleCompleted/properties/1-0-0",
+  "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self": {
+    "vendor": "org.apache.unomi",
+    "target": "events",
+    "name": "articleCompletedProperties",
+    "format": "jsonschema",
+    "version": "1-0-0"
+  },
+  "title": "ArticleCompletedProperties",
+  "type": "object",
+  "properties": {
+    "title": {
+      "type": "string"
+    },
+    "course": {
+      "type": "string"
+    }
+  }
+}

Review Comment:
   Careful, this schema doesn't contains "unevaluatedProperty:false", so it could produce mapping explosion



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/profile.json:
##########
@@ -1,6 +1,12 @@
 {
   "$id": "https://unomi.apache.org/schemas/json/profile/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self":{
+    "vendor":"The Apache Software Foundation",
+    "name": "profile",
+    "format":"jsonschema",
+    "version":"1-0-0"
+  },

Review Comment:
   Do we still need this schema ? if not we can remove it.



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/values/date.json:
##########
@@ -1,6 +1,13 @@
 {
     "$id": "https://unomi.apache.org/schemas/json/values/date/1-0-0",
     "$schema": "https://json-schema.org/draft/2019-09/schema",
+    "self":{
+        "vendor":"The Apache Software Foundation",
+        "target" : "values",
+        "name": "date",
+        "format":"jsonschema",
+        "version":"1-0-0"
+    },

Review Comment:
   do we still need this schemas on values type ?



##########
extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/articleCompleted.json:
##########
@@ -2,23 +2,18 @@
   "$id": "https://unomi.apache.org/schemas/json/events/articleCompleted/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "self":{
-    "vendor":"org.apache.unomi",
+    "vendor":"The Apache Software Foundation",

Review Comment:
   Careful, this schema doesn't contains "unevaluatedProperty:false", so it could produce mapping explosion



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitem.json:
##########
@@ -1,6 +1,12 @@
 {
   "$id": "https://unomi.apache.org/schemas/json/customitem/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self":{
+    "vendor":"The Apache Software Foundation",
+    "name": "customItem",
+    "format":"jsonschema",
+    "version":"1-0-0"
+  },

Review Comment:
   Not sure this schema is still necessary, I dont see why event should use customItem for now.



##########
extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/identify.json:
##########
@@ -2,7 +2,7 @@
   "$id": "https://unomi.apache.org/schemas/json/events/identify/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "self":{
-    "vendor":"org.apache.unomi",
+    "vendor":"The Apache Software Foundation",

Review Comment:
   Careful, this schema doesn't contains "unevaluatedProperty:false", so it could produce mapping explosion



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/conditiontype.json:
##########
@@ -1,6 +1,12 @@
 {
   "$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"
+  },

Review Comment:
   This schema doesn't seem's to be used. We could remove it ?



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page.json:
##########
@@ -16,58 +16,9 @@
     }
   ],

Review Comment:
   I think we should get rid of the allOf ref on customitem here, the page is not really a custom item since it is not indexed in a separate own index as a dedicated Item.
   Page is just a object of the event targets/sources.



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/modifyConsent.json:
##########
@@ -13,18 +13,14 @@
   "allOf": [{ "$ref": "https://unomi.apache.org/schemas/json/event/1-0-0" }],
   "properties" : {
     "properties" : {
-      "type" : "object",
-      "properties" : {
-        "consent" : {
-          "$ref" : "https://unomi.apache.org/schemas/json/consent/1-0-0"
-        }
-      }
+      "$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"
     },

Review Comment:
   Does the modify consent event really have a page as source ?
   For me it would be better to have modifyConsent/target json schema



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties/attributes.json:
##########
@@ -0,0 +1,15 @@
+{
+  "$id": "https://unomi.apache.org/schemas/json/customitems/page/properties/attributes/1-0-0",

Review Comment:
   I think this JSON schema would be better in JExp



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/metadataitem.json:
##########
@@ -1,6 +1,12 @@
 {
   "$id": "https://unomi.apache.org/schemas/json/metadataitem/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self":{
+    "vendor":"The Apache Software Foundation",
+    "name": "metadataItem",
+    "format":"jsonschema",
+    "version":"1-0-0"
+  },

Review Comment:
   This JSON Schema is not required and should be removed.



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/goal.json:
##########
@@ -1,6 +1,12 @@
 {
   "$id": "https://unomi.apache.org/schemas/json/goal/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self":{
+    "vendor":"The Apache Software Foundation",
+    "name": "goal",
+    "format":"jsonschema",
+    "version":"1-0-0"
+  },

Review Comment:
   This JSON Schema is not required and should be remove.



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/values/set.json:
##########
@@ -1,6 +1,13 @@
 {
     "$id": "https://unomi.apache.org/schemas/json/values/set/1-0-0",
     "$schema": "https://json-schema.org/draft/2019-09/schema",
+    "self":{
+        "vendor":"The Apache Software Foundation",
+        "target" : "values",
+        "name": "set",
+        "format":"jsonschema",
+        "version":"1-0-0"
+    },

Review Comment:
   do we still need this schemas on values type ?



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties.json:
##########
@@ -0,0 +1,27 @@
+{
+  "$id": "https://unomi.apache.org/schemas/json/customitems/page/properties/1-0-0",

Review Comment:
   I think this JSON schema would be better in JExp



##########
extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/identify.json:
##########
@@ -13,12 +13,7 @@
   "allOf": [{ "$ref": "https://unomi.apache.org/schemas/json/event/1-0-0" }],
   "properties" : {
     "properties" : {
-      "type" : "object",
-      "properties" : {
-        "consent" : {
-          "$ref" : "https://unomi.apache.org/schemas/json/consent/1-0-0"
-        }
-      }
+      "$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"

Review Comment:
   Does this event should not have his own JSON Schemas for the target/source object ? 



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/values/long.json:
##########
@@ -1,6 +1,13 @@
 {
   "$id": "https://unomi.apache.org/schemas/json/values/long/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self":{
+    "vendor":"The Apache Software Foundation",
+    "target" : "values",
+    "name": "long",
+    "format":"jsonschema",
+    "version":"1-0-0"
+  },

Review Comment:
   do we still need this schemas on values type ?



##########
extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/articleCompleted.json:
##########
@@ -2,23 +2,18 @@
   "$id": "https://unomi.apache.org/schemas/json/events/articleCompleted/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "self":{
-    "vendor":"org.apache.unomi",
+    "vendor":"The Apache Software Foundation",
     "target" : "events",
     "name": "articleCompleted",
     "format":"jsonschema",
     "version":"1-0-0"
   },
-  "title": "AnonimyzeProfileEvent",
+  "title": "ArticleCompletedEvent",
   "type": "object",
   "allOf": [{ "$ref": "https://unomi.apache.org/schemas/json/event/1-0-0" }],
   "properties" : {
     "properties" : {
-      "type" : "object",
-      "properties" : {
-        "consent" : {
-          "$ref" : "https://unomi.apache.org/schemas/json/consent/1-0-0"
-        }
-      }
+      "$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"

Review Comment:
   May this event should have his own source/target object JSON Schemas, dont see why it should use customitem/1-0-0 as source for example.



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/values/string.json:
##########
@@ -1,6 +1,13 @@
 {
     "$id": "https://unomi.apache.org/schemas/json/values/string/1-0-0",
     "$schema": "https://json-schema.org/draft/2019-09/schema",
+    "self":{
+        "vendor":"The Apache Software Foundation",
+        "target" : "values",
+        "name": "string",
+        "format":"jsonschema",
+        "version":"1-0-0"
+    },

Review Comment:
   do we still need this schemas on values type ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] sergehuber commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
sergehuber commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r893437248


##########
extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/identify.json:
##########
@@ -13,12 +13,7 @@
   "allOf": [{ "$ref": "https://unomi.apache.org/schemas/json/event/1-0-0" }],
   "properties" : {
     "properties" : {
-      "type" : "object",
-      "properties" : {
-        "consent" : {
-          "$ref" : "https://unomi.apache.org/schemas/json/consent/1-0-0"
-        }
-      }
+      "$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"

Review Comment:
   In the example it is by default using the site as a source and a page as a target but in the schema it was not correct. We should fix that.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] jsinovassin commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
jsinovassin commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r894426857


##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/items/interests/interests.json:
##########
@@ -0,0 +1,18 @@
+{
+  "$id": "https://unomi.apache.org/schemas/json/interests/1-0-0",
+  "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self":{
+    "vendor":"org.apache.unomi",
+    "name": "interests",
+    "format":"jsonschema",
+    "version":"1-0-0"
+  },
+  "title": "Interests",
+  "type": "object",
+  "patternProperties": {
+    "^.*$": {

Review Comment:
   Can't we limit to only alphanumerics characters?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] sergehuber commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
sergehuber commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r894469285


##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/items/page/page.properties.pageInfo.json:
##########
@@ -0,0 +1,63 @@
+{
+  "$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",
+    "name": "pageInfo",
+    "format": "jsonschema",
+    "version": "1-0-0"
+  },
+  "title": "PageInfo",
+  "type": "object",
+  "properties": {
+    "templateName": {
+      "type": ["null", "string"]
+    },
+    "language": {
+      "type": ["null", "string"],
+      "maxLength": 5
+    },
+    "destinationURL": {
+      "type": ["null", "string"],
+      "format": "uri"
+    },
+    "destinationSearch": {
+      "type": ["null", "string"]
+    },
+    "categories": {
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
+    },
+    "pageID": {
+      "type": ["null", "string"]
+    },
+    "nodeType": {
+      "type": ["null", "string"]
+    },
+    "pagePath": {
+      "type": ["null", "string"]
+    },
+    "pageName": {
+      "type": ["null", "string"]
+    },
+    "referringURL": {
+      "type": ["null", "string"],
+      "format": "uri"
+    },
+    "tags": {
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
+    },
+    "isContentTemplate": {

Review Comment:
   I was thinking we could use extensions for non-Unomi properties such as these, what do you think ?



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/items/interests/interests.json:
##########
@@ -0,0 +1,18 @@
+{
+  "$id": "https://unomi.apache.org/schemas/json/interests/1-0-0",
+  "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self":{
+    "vendor":"org.apache.unomi",
+    "name": "interests",
+    "format":"jsonschema",
+    "version":"1-0-0"
+  },
+  "title": "Interests",
+  "type": "object",
+  "patternProperties": {
+    "^.*$": {

Review Comment:
   This might cause problems in other languages such as Chinese, Cyrillic, etc... 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] sergehuber commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
sergehuber commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r893437248


##########
extensions/web-tracker/wab/src/main/resources/META-INF/cxs/schemas/identify.json:
##########
@@ -13,12 +13,7 @@
   "allOf": [{ "$ref": "https://unomi.apache.org/schemas/json/event/1-0-0" }],
   "properties" : {
     "properties" : {
-      "type" : "object",
-      "properties" : {
-        "consent" : {
-          "$ref" : "https://unomi.apache.org/schemas/json/consent/1-0-0"
-        }
-      }
+      "$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"

Review Comment:
   In the example it is by default using the site as a source and a page as a target but in the schema it was not correct. I'll fix that.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] jkevan commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
jkevan commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r894487389


##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/items/interests/interests.json:
##########
@@ -0,0 +1,18 @@
+{
+  "$id": "https://unomi.apache.org/schemas/json/interests/1-0-0",
+  "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self":{
+    "vendor":"org.apache.unomi",
+    "name": "interests",
+    "format":"jsonschema",
+    "version":"1-0-0"
+  },
+  "title": "Interests",
+  "type": "object",
+  "patternProperties": {
+    "^.*$": {

Review Comment:
   For now we will not restreint this, if validation is asked on the keys of the interests we will do something, for now it's not the case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] sergehuber commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
sergehuber commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r886737819


##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/conditiontype.json:
##########
@@ -1,6 +1,12 @@
 {
   "$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"
+  },

Review Comment:
   I'll remove it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] sergehuber commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
sergehuber commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r886740470


##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page.json:
##########
@@ -16,58 +16,9 @@
     }
   ],

Review Comment:
   I'm not sure if this is better than removing the custom item. Note that custom item here means the CustomItem class, not a custom item as something that is managed in its own index, but maybe the confusion is coming from there ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] sergehuber commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
sergehuber commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r886739641


##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page.json:
##########
@@ -16,58 +16,9 @@
     }
   ],

Review Comment:
   If I do that I would have to add the itemId and itemType directly in the page object, is this what you are suggesting ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] sergehuber commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
sergehuber commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r888947651


##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/events/form.json:
##########
@@ -2,7 +2,7 @@
   "$id": "https://unomi.apache.org/schemas/json/events/form/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "self":{
-    "vendor":"org.apache.unomi",
+    "vendor":"The Apache Software Foundation",

Review Comment:
   Also, this will be handled in a separate issue.



##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/site.json:
##########
@@ -2,7 +2,7 @@
   "$id": "https://unomi.apache.org/schemas/json/customitems/site/1-0-0",
   "$schema": "https://json-schema.org/draft/2019-09/schema",
   "self":{
-    "vendor":"org.apache.unomi",
+    "vendor":"The Apache Software Foundation",

Review Comment:
   Also, this will be handled in a separate issue.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] sergehuber commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
sergehuber commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r888947174


##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/customitems/page/properties/pageInfo.json:
##########
@@ -0,0 +1,58 @@
+{
+  "$id": "https://unomi.apache.org/schemas/json/customitems/page/properties/pageInfo/1-0-0",
+  "$schema": "https://json-schema.org/draft/2019-09/schema",
+  "self": {
+    "vendor": "org.apache.unomi",
+    "name": "pageInfo",
+    "format": "jsonschema",
+    "version": "1-0-0"
+  },

Review Comment:
   This will not be handled in this PR but in a separate one.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] jkevan commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
jkevan commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r894488273


##########
extensions/json-schema/services/src/main/resources/META-INF/cxs/schemas/items/page/page.properties.pageInfo.json:
##########
@@ -0,0 +1,63 @@
+{
+  "$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",
+    "name": "pageInfo",
+    "format": "jsonschema",
+    "version": "1-0-0"
+  },
+  "title": "PageInfo",
+  "type": "object",
+  "properties": {
+    "templateName": {
+      "type": ["null", "string"]
+    },
+    "language": {
+      "type": ["null", "string"],
+      "maxLength": 5
+    },
+    "destinationURL": {
+      "type": ["null", "string"],
+      "format": "uri"
+    },
+    "destinationSearch": {
+      "type": ["null", "string"]
+    },
+    "categories": {
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
+    },
+    "pageID": {
+      "type": ["null", "string"]
+    },
+    "nodeType": {
+      "type": ["null", "string"]
+    },
+    "pagePath": {
+      "type": ["null", "string"]
+    },
+    "pageName": {
+      "type": ["null", "string"]
+    },
+    "referringURL": {
+      "type": ["null", "string"],
+      "format": "uri"
+    },
+    "tags": {
+      "type": "array",
+      "items": {
+        "type": "string"
+      }
+    },
+    "isContentTemplate": {

Review Comment:
   This properties if necessary have to be identified and if require we will manage this in a separate PR once actions are defined on the subject.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [unomi] jsinovassin commented on a diff in pull request #428: UNOMI-569 Flatten JSON Schemas & fix schema bugs

Posted by GitBox <gi...@apache.org>.
jsinovassin commented on code in PR #428:
URL: https://github.com/apache/unomi/pull/428#discussion_r894411014


##########
itests/src/test/java/org/apache/unomi/itests/BasicIT.java:
##########
@@ -39,6 +39,7 @@
 import org.apache.unomi.api.services.RulesService;
 import org.apache.unomi.itests.tools.httpclient.HttpClientThatWaitsForUnomi;
 import org.apache.unomi.persistence.spi.CustomObjectMapper;
+import org.apache.unomi.schema.api.SchemaService;

Review Comment:
   Seems that is not used in the test



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@unomi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org