Skip to content

Commit

Permalink
Updating all fields to be required as an enum; changed payment_id fie…
Browse files Browse the repository at this point in the history
…ld in order entity to be a singular ID.
  • Loading branch information
misterpig committed May 22, 2024
1 parent 42ddd8c commit 60fd0af
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 31 deletions.
9 changes: 4 additions & 5 deletions schemas/io.snowplow.ecomm/add_to_cart/jsonschema/1-0-0
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
"maxLength": 255
},
"item_type": {
"type": [
"string",
"null"
],
"description": "Examples: \"product\", \"bundle\", \"gift_card\"",
"type": "string",
"enum": ["product", "bundle"],
"description": "The general type of the item, currently supports the two types of a singular product and a bundle of products.",
"maxLength": 255
},
"quantity": {
Expand Down Expand Up @@ -42,6 +40,7 @@
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"required": [
"item_id",
"item_type",
"quantity",
"cart_id"
]
Expand Down
15 changes: 7 additions & 8 deletions schemas/io.snowplow.ecomm/add_to_list/jsonschema/1-0-0
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
"description": "A unique identifier for the list the product was added to, if not a generic common list.",
"maxLength": 255
},
"entity_id": {
"item_id": {
"type": "string",
"description": "ID reference to the entity (as listed in entity) that was added to the list.",
"maxLength": 255
},
"entity_type": {
"type": [
"string",
"null"
],
"description": "The type of entity referenced by entity_id.",
"item_type": {
"type": "string",
"enum": ["product", "bundle"],
"description": "The general type of the item, currently supports the two types of a singular product and a bundle of products.",
"maxLength": 255
}
},
Expand All @@ -39,6 +37,7 @@
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"required": [
"list_id",
"entity_id"
"item_id",
"item_type"
]
}
6 changes: 4 additions & 2 deletions schemas/io.snowplow.ecomm/click_item/jsonschema/1-0-0
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
},
"item_type": {
"type": "string",
"description": "Examples: \"product\", \"bundle\"",
"enum": ["product", "bundle"],
"description": "The general type of the item, currently supports the two types of a singular product and a bundle of products.",
"maxLength": 255
},
"click_position": {
Expand All @@ -31,6 +32,7 @@
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"required": [
"item_id"
"item_id",
"item_type"
]
}
15 changes: 4 additions & 11 deletions schemas/io.snowplow.ecomm/order/jsonschema/1-0-0
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,10 @@
"description": "The currency used to make the payment (ISO 4217).",
"maxLength": 3
},
"payment_ids": {
"type": [
"array",
"null"
],
"description": "The payment methods used",
"items": {
"type": "string",
"description": "The payment IDs.",
"maxLength": 255
}
"payment_id": {
"type": "string",
"description": "The payment ID.",
"maxLength": 255
},
"cart_id": {
"type": [
Expand Down
8 changes: 4 additions & 4 deletions schemas/io.snowplow.ecomm/update_quantity/jsonschema/1-0-0
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
"maxLength": 255
},
"item_type": {
"type": [
"string",
"null"
],
"type": "string",
"enum": ["product", "bundle"],
"description": "The general type of the item, currently supports the two types of a singular product and a bundle of products.",
"maxLength": 255
},
"previous_quantity": {
Expand Down Expand Up @@ -43,6 +42,7 @@
"required": [
"cart_id",
"item_id",
"item_type",
"quantity"
]
}
9 changes: 8 additions & 1 deletion schemas/io.snowplow.ecomm/view_item/jsonschema/1-0-0
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"type": "string",
"description": "ID reference to the item (as listed in item) that was viewed. This could be a product or bundle entity.",
"maxLength": 255
},
"item_type": {
"type": "string",
"enum": ["product", "bundle"],
"description": "The general type of the item, currently supports the two types of a singular product and a bundle of products.",
"maxLength": 255
}
},
"additionalProperties": false,
Expand All @@ -17,6 +23,7 @@
},
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"required": [
"item_id"
"item_id",
"item_type"
]
}

0 comments on commit 60fd0af

Please sign in to comment.