Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions examples/events/snowplow-debugger/product.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
"type": "integer"
},
"name": {
"maxLength": 256
"type": "string",
"maxLength": 256,
"minLength": 1
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more I am thinking about this, should we also add minLength to the name field since it is also required?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why "name" is a required field. I don't think we have any filters related to that in the code today. If we do, we can consider adding minLength otherwise I'd leave it as is

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we are unsure of the effects then I'll just keep the minLength added to sku and we can revisit name at a different point. I'm not sure we can be sure of all of the ways adding minLength to name will change things 😬

"sku": {
"type": "string",
"maxLength": 256
"maxLength": 256,
"minLength": 1
},
"topLevelSku": {
"type": [
Expand Down Expand Up @@ -171,7 +174,7 @@
"vendor": "com.adobe.magento.entity",
"name": "product",
"format": "jsonschema",
"version": "2-0-5"
"version": "2-0-7"
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
}
}
18 changes: 11 additions & 7 deletions examples/events/snowplow-debugger/recommendation-unit.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
"properties": {
"name": {
"type": "string",
"maxLength": 256
"maxLength": 256,
"minLength": 1
},
"unitId": {
"type": "string",
"maxLength": 256
"maxLength": 256,
"minLength": 1
},
"itemsCount": {
"type": "integer"
Expand All @@ -17,15 +19,18 @@
},
"configType": {
"type": "string",
"maxLength": 256
"maxLength": 256,
"minLength": 1
},
"source": {
"type": "string",
"maxLength": 256
"maxLength": 256,
"minLength": 1
},
"recType": {
"type": "string",
"maxLength": 256
"maxLength": 256,
"minLength": 1
},
"placement": {
"type": [
Expand Down Expand Up @@ -63,8 +68,7 @@
"vendor": "com.adobe.magento.entity",
"name": "recommendation-unit",
"format": "jsonschema",
"version": "1-0-4"
"version": "1-0-5"
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
}

27 changes: 17 additions & 10 deletions examples/events/snowplow-debugger/recommended-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"properties": {
"unitId": {
"type": "string",
"maxLength": 256
"maxLength": 256,
"minLength": 1
},
"serviceRank": {
"type": "integer"
Expand All @@ -13,15 +14,18 @@
},
"name": {
"type": "string",
"maxLength": 256
"maxLength": 256,
"minLength": 1
},
"sku": {
"type": "string",
"maxLength": 64
"maxLength": 64,
"minLength": 1
},
"url": {
"type": "string",
"maxLength": 2083
"maxLength": 2083,
"minLength": 1
},
"imageUrl": {
"type": [
Expand Down Expand Up @@ -54,7 +58,8 @@
"type": "object",
"properties": {
"code": {
"type": "string"
"type": "string",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have rarely seen finalAdjustments being set in price data. Doesn't look like it's marked as required, we can remove this

"minLength": 1
},
"amount": {
"type": "number"
Expand All @@ -73,7 +78,8 @@
"type": "object",
"properties": {
"code": {
"type": "string"
"type": "string",
"minLength": 1
},
"amount": {
"type": "number"
Expand Down Expand Up @@ -114,7 +120,8 @@
"type": "object",
"properties": {
"code": {
"type": "string"
"type": "string",
"minLength": 1
},
"amount": {
"type": "number"
Expand All @@ -133,7 +140,8 @@
"type": "object",
"properties": {
"code": {
"type": "string"
"type": "string",
"minLength": 1
},
"amount": {
"type": "number"
Expand Down Expand Up @@ -183,8 +191,7 @@
"vendor": "com.adobe.magento.entity",
"name": "recommended-item",
"format": "jsonschema",
"version": "1-0-4"
"version": "1-0-5"
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
}

12 changes: 7 additions & 5 deletions examples/events/snowplow-debugger/recs-api-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,24 @@
]
},
"websiteCode": {
"type": "string"
"type": "string",
"minLength": 1
},
"storeId": {
"type": "integer"
},
"storeCode": {
"type": "string",
"maxLength": 256
"maxLength": 256,
"minLength": 1
},
"storeViewId": {
"type": "integer"
},
"storeViewCode": {
"type": "string",
"maxLength": 256
"maxLength": 256,
"minLength": 1
},
"defaultStoreViewCode": {
"type": [
Expand Down Expand Up @@ -168,8 +171,7 @@
"vendor": "com.adobe.magento.entity",
"name": "recs-api-request",
"format": "jsonschema",
"version": "2-0-13"
"version": "2-0-14"
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
}

1 change: 0 additions & 1 deletion examples/events/snowplow-debugger/recs-api-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
}

11 changes: 7 additions & 4 deletions examples/events/snowplow-debugger/search-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"description": "Schema for Search Input Entity",
"properties": {
"searchUnitId": {
"type": "string"
"type": "string",
"minLength": 1
},
"source": {
"type": [
Expand All @@ -11,15 +12,17 @@
]
},
"queryTypes": {
"type": "array"
"type": "array",
"minLength": 1
},
"searchRequestId": {
"type": "string",
"maxLength": 256,
"minLength": 1
},
"query": {
"type": "string"
"type": "string",
"minLength": 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this maps to phrase in productSearch request. If so, there are cases where it could be empty (when browsing a category page, gql query filters on a category but no phrase is provided).

},
"page": {
"type": "number"
Expand Down Expand Up @@ -83,7 +86,7 @@
"vendor": "com.adobe.magento.entity",
"name": "search-input",
"format": "jsonschema",
"version": "1-0-11"
"version": "2-0-1"
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
}
15 changes: 9 additions & 6 deletions examples/events/snowplow-debugger/search-result-product.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@
"description": "Schema for Product Search Result Entity",
"properties": {
"name": {
"type": "string"
"type": "string",
"minLength": 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens here if the search returns no results? We might still need the events but with empty fields?

},
"url": {
"type": "string"
"type": "string",
"minLength": 1
},
"rank": {
"type": "number"
},
"sku": {
"type": "string"
"type": "string",
"minLength": 1
},
"imageUrl": {
"type": "string"
"type": "string",
"minLength": 1
},
"price": {
"type": "number"
Expand All @@ -33,8 +37,7 @@
"vendor": "com.adobe.magento.entity",
"name": "search-result-product",
"format": "jsonschema",
"version": "1-0-2"
"version": "1-0-3"
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
}

39 changes: 26 additions & 13 deletions examples/events/snowplow-debugger/search-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"description": "Schema for Search Results Entity",
"properties": {
"searchUnitId": {
"type": "string"
"type": "string",
"minLength": 1
},
"searchRequestId": {
"type": "string",
Expand All @@ -27,19 +28,23 @@
"description": "Schema for Product Search Result Entity",
"properties": {
"name": {
"type": "string"
"type": "string",
"minLength": 1
},
"url": {
"type": "string"
"type": "string",
"minLength": 1
},
"rank": {
"type": "number"
},
"sku": {
"type": "string"
"type": "string",
"minLength": 1
},
"imageUrl": {
"type": "string"
"type": "string",
"minLength": 1
},
"price": {
"type": "number"
Expand Down Expand Up @@ -72,7 +77,8 @@
"description": "Schema for Suggestion Search Results ",
"properties": {
"suggestion": {
"type": "string"
"type": "string",
"minLength": 1
},
"rank": {
"type": "number"
Expand Down Expand Up @@ -102,10 +108,12 @@
"description": "Schema for Category Search Results",
"properties": {
"name": {
"type": "string"
"type": "string",
"minLength": 1
},
"url": {
"type": "string"
"type": "string",
"minLength": 1
},
"rank": {
"type": "number"
Expand Down Expand Up @@ -150,20 +158,25 @@
"items": {
"properties": {
"attribute": {
"type": "string"
"type": "string",
"minLength": 1
},
"title": {
"type": "string"
"type": "string",
"minLength": 1
},
"type": {
"type": "string"
"type": "string",
"minLength": 1
},
"buckets": {
"type": "array",
"minLength": 1,
"items": {
"properties": {
"title": {
"type": "string"
"type": "string",
"minLength": 1
}
},
"type": "object",
Expand Down Expand Up @@ -204,7 +217,7 @@
"vendor": "com.adobe.magento.entity",
"name": "search-results",
"format": "jsonschema",
"version": "1-0-11"
"version": "2-0-1"
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#"
}
Loading