From 111a5877d53ae7cb38418c0942eb17c73d19e132 Mon Sep 17 00:00:00 2001 From: szareiangm Date: Wed, 11 Jul 2018 20:40:03 -0400 Subject: [PATCH] Add events to enrichment settings file (Closes #806) --- .../jsonschema/1-0-1 | 173 ++++++++++++++ .../jsonschema/1-0-1 | 42 ++++ .../jsonschema/1-0-1 | 102 ++++++++ .../pii_enrichment_config/jsonschema/2-0-1 | 171 ++++++++++++++ .../jsonschema/1-0-1 | 217 ++++++++++++++++++ .../jsonschema/1-0-1 | 59 +++++ .../anon_ip/jsonschema/1-0-1 | 44 ++++ .../campaign_attribution/jsonschema/1-0-2 | 80 +++++++ .../event_fingerprint_config/jsonschema/1-0-1 | 49 ++++ .../ip_lookups/jsonschema/2-0-1 | 97 ++++++++ .../referer_parser/jsonschema/1-0-1 | 45 ++++ .../ua_parser_config/jsonschema/1-0-1 | 37 +++ .../user_agent_utils_config/jsonschema/1-0-1 | 37 +++ 13 files changed, 1153 insertions(+) create mode 100644 schemas/com.snowplowanalytics.snowplow.enrichments/api_request_enrichment_config/jsonschema/1-0-1 create mode 100644 schemas/com.snowplowanalytics.snowplow.enrichments/http_header_extractor_config/jsonschema/1-0-1 create mode 100644 schemas/com.snowplowanalytics.snowplow.enrichments/iab_spiders_and_robots_enrichment/jsonschema/1-0-1 create mode 100644 schemas/com.snowplowanalytics.snowplow.enrichments/pii_enrichment_config/jsonschema/2-0-1 create mode 100644 schemas/com.snowplowanalytics.snowplow.enrichments/sql_query_enrichment_config/jsonschema/1-0-1 create mode 100644 schemas/com.snowplowanalytics.snowplow.enrichments/weather_enrichment_config/jsonschema/1-0-1 create mode 100644 schemas/com.snowplowanalytics.snowplow/anon_ip/jsonschema/1-0-1 create mode 100644 schemas/com.snowplowanalytics.snowplow/campaign_attribution/jsonschema/1-0-2 create mode 100644 schemas/com.snowplowanalytics.snowplow/event_fingerprint_config/jsonschema/1-0-1 create mode 100644 schemas/com.snowplowanalytics.snowplow/ip_lookups/jsonschema/2-0-1 create mode 100644 schemas/com.snowplowanalytics.snowplow/referer_parser/jsonschema/1-0-1 create mode 100644 schemas/com.snowplowanalytics.snowplow/ua_parser_config/jsonschema/1-0-1 create mode 100644 schemas/com.snowplowanalytics.snowplow/user_agent_utils_config/jsonschema/1-0-1 diff --git a/schemas/com.snowplowanalytics.snowplow.enrichments/api_request_enrichment_config/jsonschema/1-0-1 b/schemas/com.snowplowanalytics.snowplow.enrichments/api_request_enrichment_config/jsonschema/1-0-1 new file mode 100644 index 000000000..6da2db041 --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow.enrichments/api_request_enrichment_config/jsonschema/1-0-1 @@ -0,0 +1,173 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for API Request Enrichment configuration", + "self": { + "vendor": "com.snowplowanalytics.snowplow.enrichments", + "name": "api_request_enrichment_config", + "format": "jsonschema", + "version": "1-0-1" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "properties": { + "inputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "pattern": "^[A-Za-z0-9_-]+$" + }, + "pojo": { + "type": "object", + "properties": { + "field": { + "type": "string" + } + }, + "additionalProperties": false + }, + "json": { + "type": "object", + "properties": { + "field": { + "type": "string", + "enum": ["unstruct_event", "contexts", "derived_contexts"] + }, + "schemaCriterion": { + "type": "string", + "pattern": "^iglu:[a-zA-Z0-9-_.]+/[a-zA-Z0-9-_]+/[a-zA-Z0-9-_]+/([1-9][0-9]*|\\*)-((?:0|[1-9][0-9]*)|\\*)-((?:0|[1-9][0-9]*)|\\*)$" + }, + "jsonPath": { + "type": "string", + "pattern": "^\\$.*$" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 2, + "required": ["key"] + } + }, + "api": { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "properties": { + "http": { + "type": "object", + "properties": { + "method": { + "type": "string", + "enum": ["GET", "POST", "PUT"] + }, + "uri": { + "type": "string" + }, + "timeout": { + "type": "integer", + "minimum": 1, + "maximum": 60000 + }, + "authentication": { + "type": "object", + "properties": { + "httpBasic": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": ["username", "password"], + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "required": ["method", "uri", "timeout", "authentication"], + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "outputs": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "schema": { + "type": "string", + "pattern": "^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([1-9][0-9]*(?:-(?:0|[1-9][0-9]*)){2})$" + }, + "json": { + "type": "object", + "properties": { + "jsonPath": { + "type": "string", + "pattern": "^\\$.*$" + } + }, + "required": ["jsonPath"], + "additionalProperties": false + } + }, + "required": ["schema"], + "minProperties": 2, + "maxProperties": 2, + "additionalProperties": false + } + }, + "cache": { + "type": "object", + "properties": { + "size": { + "type": "integer", + "minimum": 1 + }, + "ttl": { + "type": "integer", + "minimum": 0, + "maximum": 86400 + } + }, + "additionalProperties": false, + "required": ["size", "ttl"] + } + }, + "additionalProperties": false, + "required": ["inputs", "api", "outputs", "cache"] + } + }, + "additionalProperties": false, + "required": ["name", "vendor", "enabled", "parameters"] +} + diff --git a/schemas/com.snowplowanalytics.snowplow.enrichments/http_header_extractor_config/jsonschema/1-0-1 b/schemas/com.snowplowanalytics.snowplow.enrichments/http_header_extractor_config/jsonschema/1-0-1 new file mode 100644 index 000000000..6ed8ab624 --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow.enrichments/http_header_extractor_config/jsonschema/1-0-1 @@ -0,0 +1,42 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for HTTP header extractor enrichment", + "self": { + "vendor": "com.snowplowanalytics.snowplow.enrichments", + "name": "http_header_extractor_config", + "format": "jsonschema", + "version": "1-0-1" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "properties": { + "headersPattern": { + "type": "string" + } + }, + "required": ["headersPattern"], + "additionalProperties": false + } + }, + "required": ["name", "vendor", "enabled", "parameters"], + "additionalProperties": false +} diff --git a/schemas/com.snowplowanalytics.snowplow.enrichments/iab_spiders_and_robots_enrichment/jsonschema/1-0-1 b/schemas/com.snowplowanalytics.snowplow.enrichments/iab_spiders_and_robots_enrichment/jsonschema/1-0-1 new file mode 100644 index 000000000..dfdfa1cdc --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow.enrichments/iab_spiders_and_robots_enrichment/jsonschema/1-0-1 @@ -0,0 +1,102 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for IAB Spiders & Robots enrichment config", + "self": { + "vendor": "com.snowplowanalytics.snowplow.enrichments", + "name": "iab_spiders_and_robots_enrichment", + "format": "jsonschema", + "version": "1-0-1" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "properties": { + "ipFile": { + "description": "Path to IP address exclude file", + "type": "object", + "properties": { + "database": { + "enum": ["ip_exclude_current_cidr.txt"] + }, + "uri": { + "type": "string", + "format": "uri" + } + }, + "required": ["database", "uri"] + }, + "excludeUseragentFile": { + "description": "Path to user agent exclude file", + "type": "object", + "properties": { + "database": { + "enum": ["exclude_current.txt"] + }, + "uri": { + "type": "string", + "format": "uri" + } + }, + "required": ["database", "uri"] + }, + "includeUseragentFile": { + "description": "Path to user agent include file", + "type": "object", + "properties": { + "database": { + "enum": ["include_current.txt"] + }, + "uri": { + "type": "string", + "format": "uri" + } + }, + "required": ["database", "uri"] + }, + "httpUsername": { + "description": "Optional username for basic HTTP authentication", + "type": "string" + }, + "httpPassword": { + "description": "Optional password for basic HTTP authentication", + "type": "string" + } + }, + "required": [ + "ipFile", + "excludeUseragentFile", + "includeUseragentFile" + ], + "dependencies": { + "httpUsername": ["httpPassword"], + "httpPassword": ["httpUsername"] + }, + "additionalProperties": false + } + }, + "required": [ + "vendor", + "name", + "enabled", + "parameters" + ], + "additionalProperties": false +} diff --git a/schemas/com.snowplowanalytics.snowplow.enrichments/pii_enrichment_config/jsonschema/2-0-1 b/schemas/com.snowplowanalytics.snowplow.enrichments/pii_enrichment_config/jsonschema/2-0-1 new file mode 100644 index 000000000..1ed5d7aec --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow.enrichments/pii_enrichment_config/jsonschema/2-0-1 @@ -0,0 +1,171 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for PII pseudonymization enrichment", + "self": { + "vendor": "com.snowplowanalytics.snowplow.enrichments", + "name": "pii_enrichment_config", + "format": "jsonschema", + "version": "2-0-1" + }, + "type": "object", + "properties": { + "vendor": { + "type": "string", + "description": "The name of the vendor for this config (the only valid value for scala-common enrich is com.snowplowanalytics.snowplow.enrichments)" + }, + "name": { + "type": "string", + "description": "The name of the config (the only valid value for scala-common enrich is pii_enrichment_config)" + }, + "enabled": { + "type": "boolean", + "description": "Whether to enable this enrichment" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "emitEvent": { + "type": "boolean", + "description": "Whether to emit identification events from this enrichment" + }, + "parameters": { + "type": "object", + "properties": { + "pii": { + "description": "List of all the fields for which pdeudonymization will be performed", + "type": "array", + "items": { + "type": "object", + "properties": { + "pojo": { + "description": "Scalar field which contains a single string value, on which pseudonymization will be performed in the enire field (e.g. `user-123`)", + "type": "object", + "properties": { + "field": { + "enum": [ + "user_id", + "user_ipaddress", + "user_fingerprint", + "domain_userid", + "network_userid", + "ip_organization", + "ip_domain", + "tr_orderid", + "ti_orderid", + "mkt_term", + "mkt_content", + "se_category", + "se_action", + "se_label", + "se_property", + "mkt_clickid", + "refr_domain_userid", + "domain_sessionid" + ] + } + }, + "required": [ + "field" + ], + "additionalProperties": false + }, + "json": { + "description": "JSON field which contains a JSON string value, on which pseudonymization will be performed on a specific JSON path", + "type": "object", + "properties": { + "field": { + "enum": [ + "contexts", + "derived_contexts", + "unstruct_event" + ] + }, + "schemaCriterion": { + "type": "string", + "pattern": "^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([1-9][0-9]*|\\*)-((?:0|[1-9][0-9]*)|\\*)-((?:0|[1-9][0-9]*)|\\*)$" + }, + "jsonPath": { + "type": "string", + "pattern": "^\\$.*$" + } + }, + "required": [ + "field", + "schemaCriterion", + "jsonPath" + ], + "additionalProperties": false + } + }, + "oneOf": [ + { + "required": [ + "pojo" + ] + }, + { + "required": [ + "json" + ] + } + ], + "additionalProperties": false + } + }, + "strategy": { + "description": "The pseudonymization strategy which will be applied to all the fields specified in the `pii` section", + "type": "object", + "properties": { + "pseudonymize": { + "description": "Pseudonymization strategy that hashes using a specified algorithm", + "type": "object", + "properties": { + "hashFunction": { + "description": "The hash function that will be used by this strategy", + "enum": [ + "MD2", + "MD5", + "SHA-1", + "SHA-256", + "SHA-384", + "SHA-512" + ] + }, + "salt": { + "description": "A salt that will be added to the field durring hashing", + "type": "string" + } + }, + "required": [ + "hashFunction", + "salt" + ], + "additionalProperties": false + } + }, + "required": [ + "pseudonymize" + ], + "additionalProperties": false + } + }, + "required": [ + "pii", + "strategy" + ], + "additionalProperties": false + } + }, + "required": [ + "vendor", + "name", + "enabled", + "emitEvent", + "parameters" + ], + "additionalProperties": false +} diff --git a/schemas/com.snowplowanalytics.snowplow.enrichments/sql_query_enrichment_config/jsonschema/1-0-1 b/schemas/com.snowplowanalytics.snowplow.enrichments/sql_query_enrichment_config/jsonschema/1-0-1 new file mode 100644 index 000000000..41423eea2 --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow.enrichments/sql_query_enrichment_config/jsonschema/1-0-1 @@ -0,0 +1,217 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for SQL Query enrichment configuration", + "self": { + "vendor": "com.snowplowanalytics.snowplow.enrichments", + "name": "sql_query_enrichment_config", + "format": "jsonschema", + "version": "1-0-1" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "properties": { + "inputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "placeholder": { + "type": "integer", + "minimum": 1, + "maximum": 64 + }, + "pojo": { + "type": "object", + "properties": { + "field": { + "type": "string" + } + }, + "additionalProperties": false, + "required": ["field"] + }, + "json": { + "type": "object", + "properties": { + "field": { + "type": "string", + "enum": ["unstruct_event", "contexts", "derived_contexts"] + }, + "schemaCriterion": { + "type": "string", + "pattern": "^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([1-9][0-9]*|\\*)-((?:0|[1-9][0-9]*)|\\*)-((?:0|[1-9][0-9]*)|\\*)$" + }, + "jsonPath": { + "type": "string" + } + }, + "additionalProperties": false, + "required": ["field", "schemaCriterion", "jsonPath"] + } + }, + "additionalProperties": false, + "minProperties": 2, + "maxProperties": 2, + "required": ["placeholder"] + } + }, + "database": { + "oneOf": [ + + { + "type": "object", + "properties": { + "postgresql": { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "minimum": 1, + "maximum": 65535 + }, + "sslMode": { + "type": "boolean" + }, + "username": { + "type": "string", + "minLength": 1 + }, + "password": { + "type": "string" + }, + "database": { + "type": "string", + "minLength": 1 + } + }, + "required": ["host", "port", "sslMode", "username", "password", "database"], + "additionalProperties": false + } + }, + "required": ["postgresql"], + "additionalProperties": false + }, + + { + "type": "object", + "properties": { + "mysql": { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "minimum": 1, + "maximum": 65535 + }, + "sslMode": { + "type": "boolean" + }, + "username": { + "type": "string", + "minLength": 1 + }, + "password": { + "type": "string" + }, + "database": { + "type": "string", + "minLength": 1 + } + }, + "required": ["host", "port", "sslMode", "username", "password", "database"], + "additionalProperties": false + } + }, + "required": ["mysql"] + } + ], + "additionalProperties": true + }, + "query": { + "type": "object", + "properties": { + "sql": { + "type": "string" + } + }, + "required": ["sql"], + "additionalProperties": false + }, + "output": { + "type": "object", + "properties": { + "expectedRows": { + "type": "string", + "enum": ["AT_LEAST_ONE", "AT_LEAST_ZERO", "AT_MOST_ONE", "EXACTLY_ONE"] + }, + "json": { + "type": "object", + "properties": { + "schema": { + "type": "string", + "pattern": "^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/([1-9][0-9]*(?:-(?:0|[1-9][0-9]*)){2})$" + }, + "propertyNames": { + "type": "string", + "enum": ["AS_IS", "CAMEL_CASE", "PASCAL_CASE", "SNAKE_CASE", "LOWER_CASE", "UPPER_CASE"] + }, + "describes": { + "type": "string", + "enum": ["ALL_ROWS", "EVERY_ROW"] + } + }, + "required": ["schema", "propertyNames", "describes"], + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "cache": { + "type": "object", + "properties": { + "size": { + "type": "integer", + "minimum": 0 + }, + "ttl": { + "type": "integer", + "minimum": 0, + "maximum": 86400 + } + }, + "additionalProperties": false, + "required": ["size", "ttl"] + } + }, + "additionalProperties": false, + "required": ["inputs", "database", "query", "output", "cache"] + } + }, + "additionalProperties": false, + "required": ["name", "vendor", "enabled", "parameters"] +} diff --git a/schemas/com.snowplowanalytics.snowplow.enrichments/weather_enrichment_config/jsonschema/1-0-1 b/schemas/com.snowplowanalytics.snowplow.enrichments/weather_enrichment_config/jsonschema/1-0-1 new file mode 100644 index 000000000..a97cd94c2 --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow.enrichments/weather_enrichment_config/jsonschema/1-0-1 @@ -0,0 +1,59 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for weather enrichment", + "self": { + "vendor": "com.snowplowanalytics.snowplow.enrichments", + "name": "weather_enrichment_config", + "format": "jsonschema", + "version": "1-0-1" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "properties": { + "apiKey": { + "type": "string" + }, + "cacheSize": { + "type": "integer", + "minimum": 1, + "maximum": 1000000 + }, + "geoPrecision": { + "type": "integer", + "minimum": 1, + "maximum": 10 + }, + "apiHost": { + "type": "string" + }, + "timeout": { + "type": "integer", + "minimum": 1 + } + }, + "required": ["apiKey", "cacheSize", "geoPrecision", "apiHost", "timeout"], + "additionalProperties": false + } + }, + "required": ["name", "vendor", "enabled", "parameters"], + "additionalProperties": false +} diff --git a/schemas/com.snowplowanalytics.snowplow/anon_ip/jsonschema/1-0-1 b/schemas/com.snowplowanalytics.snowplow/anon_ip/jsonschema/1-0-1 new file mode 100644 index 000000000..6cbc7916b --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow/anon_ip/jsonschema/1-0-1 @@ -0,0 +1,44 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for an IP anonymization enrichment", + "self": { + "vendor": "com.snowplowanalytics.snowplow", + "name": "anon_ip", + "format": "jsonschema", + "version": "1-0-1" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "properties": { + "anonOctets": { + "type": "number", + "minimum": 1, + "maximum": 4 + } + }, + "required": ["anonOctets"], + "additionalProperties": false + } + }, + "required": ["name", "vendor", "enabled", "parameters"], + "additionalProperties": false +} \ No newline at end of file diff --git a/schemas/com.snowplowanalytics.snowplow/campaign_attribution/jsonschema/1-0-2 b/schemas/com.snowplowanalytics.snowplow/campaign_attribution/jsonschema/1-0-2 new file mode 100644 index 000000000..15f98608a --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow/campaign_attribution/jsonschema/1-0-2 @@ -0,0 +1,80 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for a campaign attribution enrichment", + "self": { + "vendor": "com.snowplowanalytics.snowplow", + "name": "campaign_attribution", + "format": "jsonschema", + "version": "1-0-2" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "properties": { + "mapping": { + "enum": ["static", "script"] + }, + "fields": { + "type": "object", + "properties": { + "mktMedium": { + "$ref": "#/definitions/stringArray" + }, + "mktSource": { + "$ref": "#/definitions/stringArray" + }, + "mktTerm": { + "$ref": "#/definitions/stringArray" + }, + "mktContent": { + "$ref": "#/definitions/stringArray" + }, + "mktCampaign": { + "$ref": "#/definitions/stringArray" + }, + "mktClickId": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "required": ["mktMedium", "mktSource", "mktTerm", "mktContent", "mktCampaign"], + "additionalProperties": false + } + }, + "required": ["fields"], + "additionalProperties": false + } + }, + + "definitions": { + "stringArray": { + "type": "array", + "items": { + "type": "string" + } + } + }, + + "required": ["name", "vendor", "enabled", "parameters"], + "additionalProperties": false +} diff --git a/schemas/com.snowplowanalytics.snowplow/event_fingerprint_config/jsonschema/1-0-1 b/schemas/com.snowplowanalytics.snowplow/event_fingerprint_config/jsonschema/1-0-1 new file mode 100644 index 000000000..dec3c0dbf --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow/event_fingerprint_config/jsonschema/1-0-1 @@ -0,0 +1,49 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for configuration of an event fingerprinting enrichment", + "self": { + "vendor": "com.snowplowanalytics.snowplow", + "name": "event_fingerprint_config", + "format": "jsonschema", + "version": "1-0-1" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "properties": { + "hashAlgorithm": { + "enum": ["MD5"] + }, + "excludeParameters": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["hashAlgorithm", "excludeParameters"], + "additionalProperties": false + } + }, + "required": ["name", "vendor", "enabled", "parameters"], + "additionalProperties": false +} + diff --git a/schemas/com.snowplowanalytics.snowplow/ip_lookups/jsonschema/2-0-1 b/schemas/com.snowplowanalytics.snowplow/ip_lookups/jsonschema/2-0-1 new file mode 100644 index 000000000..9a689ed77 --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow/ip_lookups/jsonschema/2-0-1 @@ -0,0 +1,97 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for MaxMind GeoIP2 ip lookups enrichment", + "self": { + "vendor": "com.snowplowanalytics.snowplow", + "name": "ip_lookups", + "format": "jsonschema", + "version": "2-0-1" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string", + "maxLength": 256 + }, + "name": { + "type": "string", + "maxLength": 256 + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "properties": { + + "geo": { + "type": "object", + "properties": { + "database": { + "enum": ["GeoLite2-City.mmdb", "GeoIP2-City.mmdb"] + }, + "uri": { + "type": "string", + "format": "uri" + } + }, + "required": ["database", "uri"] + }, + + "isp": { + "type": "object", + "properties": { + "database": { + "enum": ["GeoIP2-ISP.mmdb"] + }, + "uri": { + "type": "string", + "format": "uri" + } + }, + "required": ["database", "uri"] + }, + + "domain": { + "type": "object", + "properties": { + "database": { + "enum": ["GeoIP2-Domain.mmdb"] + }, + "uri": { + "type": "string", + "format": "uri" + } + }, + "required": ["database", "uri"] + }, + + "connectionType": { + "type": "object", + "properties": { + "database": { + "enum": ["GeoIP2-Connection-Type.mmdb"] + }, + "uri": { + "type": "string", + "format": "uri" + } + }, + "required": ["database", "uri"] + } + + }, + "additionalProperties": false + } + }, + "required": ["name", "vendor", "enabled", "parameters"], + "additionalProperties": false +} diff --git a/schemas/com.snowplowanalytics.snowplow/referer_parser/jsonschema/1-0-1 b/schemas/com.snowplowanalytics.snowplow/referer_parser/jsonschema/1-0-1 new file mode 100644 index 000000000..778b2f9d0 --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow/referer_parser/jsonschema/1-0-1 @@ -0,0 +1,45 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for referer-parser customization enrichment", + "self": { + "vendor": "com.snowplowanalytics.snowplow", + "name": "referer_parser", + "format": "jsonschema", + "version": "1-0-1" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "properties": { + "internalDomains": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["internalDomains"], + "additionalProperties": false + } + }, + "required": ["name", "vendor", "enabled", "parameters"], + "additionalProperties": false +} diff --git a/schemas/com.snowplowanalytics.snowplow/ua_parser_config/jsonschema/1-0-1 b/schemas/com.snowplowanalytics.snowplow/ua_parser_config/jsonschema/1-0-1 new file mode 100644 index 000000000..5ae1bf825 --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow/ua_parser_config/jsonschema/1-0-1 @@ -0,0 +1,37 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for configuration of ua-parser enrichment", + "self": { + "vendor": "com.snowplowanalytics.snowplow", + "name": "ua_parser_config", + "format": "jsonschema", + "version": "1-0-1" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "maxProperties": 0 + } + }, + "required": ["name", "vendor", "enabled"], + "additionalProperties": false +} + diff --git a/schemas/com.snowplowanalytics.snowplow/user_agent_utils_config/jsonschema/1-0-1 b/schemas/com.snowplowanalytics.snowplow/user_agent_utils_config/jsonschema/1-0-1 new file mode 100644 index 000000000..0f9a0c70b --- /dev/null +++ b/schemas/com.snowplowanalytics.snowplow/user_agent_utils_config/jsonschema/1-0-1 @@ -0,0 +1,37 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for configuration of user-agent-utils enrichment", + "self": { + "vendor": "com.snowplowanalytics.snowplow", + "name": "user_agent_utils_config", + "format": "jsonschema", + "version": "1-0-1" + }, + + "type": "object", + "properties": { + "vendor": { + "type": "string" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "events" : { + "type" : [ "array", "null" ], + "items" : { + "type" : "string" + }, + "description": "Run this enrichment for the event names in the list. Use null to disable" + }, + "parameters": { + "type": "object", + "maxProperties": 0 + } + }, + "required": ["name", "vendor", "enabled"], + "additionalProperties": false +} +