From 82f4d920714e2a880abb2820607ede8984f86cde Mon Sep 17 00:00:00 2001 From: Leonard Henriquez Date: Mon, 4 Dec 2023 11:53:19 +0100 Subject: [PATCH] fix: edit schemas --- .../buz/internal/config/app/v1.0.json | 2381 +++++++++-------- 1 file changed, 1193 insertions(+), 1188 deletions(-) diff --git a/schemas/io.silverton/buz/internal/config/app/v1.0.json b/schemas/io.silverton/buz/internal/config/app/v1.0.json index fafc6c98..7004c82a 100644 --- a/schemas/io.silverton/buz/internal/config/app/v1.0.json +++ b/schemas/io.silverton/buz/internal/config/app/v1.0.json @@ -1,1225 +1,1230 @@ { - "$schema": "https://raw.githubusercontent.com/silverton-io/buz/main/schemas/io.silverton/buz/internal/meta/v1.0.json", - "$id": "https://raw.githubusercontent.com/silverton-io/buz/main/schemas/io.silverton/buz/internal/meta/v1.0.json", - "title": "io.silverton/buz/internal/config/app/v1.0.json", - "description": "Application configuration", - "owner": { - "org": "silverton", - "team": "buz", - "individual": "jakthom" + "$schema": "https://raw.githubusercontent.com/silverton-io/buz/main/schemas/io.silverton/buz/internal/meta/v1.0.json", + "$id": "https://raw.githubusercontent.com/silverton-io/buz/main/schemas/io.silverton/buz/internal/meta/v1.0.json", + "title": "io.silverton/buz/internal/config/app/v1.0.json", + "description": "Application configuration", + "owner": { + "org": "silverton", + "team": "buz", + "individual": "jakthom" + }, + "self": { + "vendor": "io.silverton", + "namespace": "buz.internal.config.app", + "version": "1.0" + }, + "type": "object", + "properties": { + "version": { + "type": "number", + "description": "The config version" }, - "self": { - "vendor": "io.silverton", - "namespace": "buz.internal.config.app", - "version": "1.0" + "app": { + "type": "object", + "description": "Application configuration", + "properties": { + "name": { + "type": "string", + "default": "some-collector", + "description": "The name of the buz collector" + }, + "env": { + "type": "string", + "default": "development", + "description": "Collector environment" + }, + "port": { + "type": "integer", + "default": "8081", + "description": "Collector port" + }, + "trackerDomain": { + "type": "string", + "default": "test.silverton.io", + "description": "The collector domain" + }, + "enableConfigRoute": { + "type": "boolean", + "default": false, + "description": "Whether or not to enable the config route" + }, + "serverless": { + "type": "boolean", + "default": false, + "description": "Whether or not to run buz in serverless mode" + }, + "schemaRoute": { + "type": "string", + "default": "/schemas/", + "description": "Alternate route for the schemas" + } + }, + "additionalProperties": false, + "required": [ + "name", + "env", + "port", + "trackerDomain", + "enableConfigRoute" + ] }, - "type": "object", - "properties": { - "version": { - "type": "number", - "description": "The config version" + "middleware": { + "type": "object", + "description": "Middleware configuration", + "properties": { + "timeout": { + "type": "object", + "description": "Request timeout configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": "false", + "description": "Whether or not to time out all requests after a specified period of time" + }, + "ms": { + "type": "integer", + "default": "2000", + "description": "Time out request and return a 4xx status code if this number of milliseconds is exceeded" + } + }, + "additionalProperties": false, + "required": [ + "enabled", + "ms" + ] }, - "app": { - "type": "object", - "description": "Application configuration", - "properties": { + "rateLimiter": { + "type": "object", + "description": "Rate limiter configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": "false", + "description": "Whether or not to enable the rate limiter" + }, + "period": { + "type": "string", + "default": "S", + "description": "The period by which to limit requests", + "enum": [ + "MS", + "S", + "M", + "H", + "D" + ] + }, + "limit": { + "type": "integer", + "default": "10", + "description": "The number of requests allowed within the specified period" + } + }, + "additionalProperties": false, + "required": [ + "enabled", + "period", + "limit" + ] + }, + "identity": { + "type": "object", + "description": "Identity middleware config", + "properties": { + "cookie": { + "type": "object", + "description": "Server-set cookie configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": "true", + "description": "Whether or not to activate the server-side id cookie" + }, "name": { - "type": "string", - "default": "some-collector", - "description": "The name of the buz collector" + "type": "string", + "default": "nuid", + "description": "The name of the id cookie" }, - "env": { - "type": "string", - "default": "development", - "description": "Collector environment" + "secure": { + "type": "boolean", + "default": "true", + "description": "Secure cookie?" }, - "port": { - "type": "integer", - "default": "8081", - "description": "Collector port" + "ttlDays": { + "type": "integer", + "default": "365", + "description": "The number of days to persist the id cookie" }, - "trackerDomain": { - "type": "string", - "default": "test.silverton.io", - "description": "The collector domain" + "domain": { + "type": "string", + "default": "silverton.io", + "description": "The id cookie domain" }, - "enableConfigRoute": { - "type": "boolean", - "default": false, - "description": "Whether or not to enable the config route" + "path": { + "type": "string", + "default": "/", + "description": "The id cookie path" }, - "serverless": { - "type": "boolean", - "default": false, - "description": "Whether or not to run buz in serverless mode" + "sameSite": { + "type": "string", + "default": "Lax", + "description": "The sameSite attribute of the id cookie", + "enum": [ + "Lax", + "Strict", + "None" + ] } - }, - "additionalProperties": false, - "required": [ + }, + "additionalProperties": false, + "required": [ + "enabled", "name", - "env", - "port", - "trackerDomain", - "enableConfigRoute" - ] + "secure", + "ttlDays", + "domain", + "path", + "sameSite" + ] + }, + "fallback": { + "type": "string", + "default": "00000000-0000-4000-A000-000000000000", + "description": "The identity fallback" + } + }, + "additionalProperties": false, + "required": [ + "cookie", + "fallback" + ] }, - "middleware": { - "type": "object", - "description": "Middleware configuration", - "properties": { - "timeout": { - "type": "object", - "description": "Request timeout configuration", - "properties": { - "enabled": { - "type": "boolean", - "default": "false", - "description": "Whether or not to time out all requests after a specified period of time" - }, - "ms": { - "type": "integer", - "default": "2000", - "description": "Time out request and return a 4xx status code if this number of milliseconds is exceeded" - } - }, - "additionalProperties": false, - "required": [ - "enabled", - "ms" - ] - }, - "rateLimiter": { - "type": "object", - "description": "Rate limiter configuration", - "properties": { - "enabled": { - "type": "boolean", - "default": "false", - "description": "Whether or not to enable the rate limiter" - }, - "period": { - "type": "string", - "default": "S", - "description": "The period by which to limit requests", - "enum": [ - "MS", - "S", - "M", - "H", - "D" - ] - }, - "limit": { - "type": "integer", - "default": "10", - "description": "The number of requests allowed within the specified period" - } - }, - "additionalProperties": false, - "required": [ - "enabled", - "period", - "limit" - ] - }, - "identity": { - "type": "object", - "description": "Identity middleware config", - "properties": { - "cookie": { - "type": "object", - "description": "Server-set cookie configuration", - "properties": { - "enabled": { - "type": "boolean", - "default": "true", - "description": "Whether or not to activate the server-side id cookie" - }, - "name": { - "type": "string", - "default": "nuid", - "description": "The name of the id cookie" - }, - "secure": { - "type": "boolean", - "default": "true", - "description": "Secure cookie?" - }, - "ttlDays": { - "type": "integer", - "default": "365", - "description": "The number of days to persist the id cookie" - }, - "domain": { - "type": "string", - "default": "silverton.io", - "description": "The id cookie domain" - }, - "path": { - "type": "string", - "default": "/", - "description": "The id cookie path" - }, - "sameSite": { - "type": "string", - "default": "Lax", - "description": "The sameSite attribute of the id cookie", - "enum": [ - "Lax", - "Strict", - "None" - ] - } - }, - "additionalProperties": false, - "required": [ - "enabled", - "name", - "secure", - "ttlDays", - "domain", - "path", - "sameSite" - ] - }, - "fallback": { - "type": "string", - "default": "00000000-0000-4000-A000-000000000000", - "description": "The identity fallback" - } - }, - "additionalProperties": false, - "required": [ - "cookie", - "fallback" - ] - }, - "cors": { - "type": "object", - "description": "CORS configuration", - "properties": { - "enabled": { - "type": "boolean", - "default": "true", - "description": "Whether or not to activate the CORS middleware" - }, - "allowOrigin": { - "type": "array", - "default": [ - "*" - ], - "description": "A list of origins to allow CORS", - "items": { - "type": "string" - } - }, - "allowCredentials": { - "type": "boolean", - "default": "true", - "description": "CORS allow credentials" - }, - "allowMethods": { - "type": "array", - "default": [ - "GET", - "POST", - "OPTIONS" - ], - "description": "HTTP methods to allow CORS", - "items": { - "type": "string", - "enum": [ - "OPTIONS", - "GET", - "POST" - ] - } - }, - "maxAge": { - "type": "integer", - "default": "86400", - "description": "Preflight request cache duration" - } - }, - "additionalProperties": false, - "required": [ - "enabled", - "allowOrigin", - "allowCredentials", - "allowMethods", - "maxAge" - ] + "cors": { + "type": "object", + "description": "CORS configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": "true", + "description": "Whether or not to activate the CORS middleware" + }, + "allowOrigin": { + "type": "array", + "default": [ + "*" + ], + "description": "A list of origins to allow CORS", + "items": { + "type": "string" + } + }, + "allowCredentials": { + "type": "boolean", + "default": "true", + "description": "CORS allow credentials" + }, + "allowMethods": { + "type": "array", + "default": [ + "GET", + "POST", + "OPTIONS" + ], + "description": "HTTP methods to allow CORS", + "items": { + "type": "string", + "enum": [ + "OPTIONS", + "GET", + "POST" + ] + } + }, + "maxAge": { + "type": "integer", + "default": "86400", + "description": "Preflight request cache duration" + } + }, + "additionalProperties": false, + "required": [ + "enabled", + "allowOrigin", + "allowCredentials", + "allowMethods", + "maxAge" + ] + }, + "requestLogger": { + "type": "object", + "description": "Request logger configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": "true", + "description": "Whether or not to activate the json request logging middleware" + } + }, + "additionalProperties": false, + "required": [ + "enabled" + ] + }, + "auth": { + "type": "object", + "description": "Auth middleware configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": "true", + "description": "Whether or not to activate auth middleware" + }, + "tokens": { + "type": "array", + "default": [ + "YnV6OmJ1enp6enp6eg==" + ], + "description": "A list of tokens to allow via auth middleware", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "enabled" + ] + } + }, + "required": [ + "timeout", + "rateLimiter", + "identity", + "cors", + "requestLogger", + "auth" + ] + }, + "inputs": { + "type": "object", + "description": "Input configuration", + "properties": { + "snowplow": { + "type": "object", + "description": "Snowplow collector configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": "true", + "description": "Whether or not to activate snowplow tracking" + }, + "standardRoutesEnabled": { + "type": "boolean", + "default": "true", + "description": "Whether to not to activate the standard snowplow routes" + }, + "openRedirectsEnabled": { + "type": "boolean", + "default": "true", + "description": "Whether or not to activate redirect-based tracking" + }, + "getPath": { + "type": "string", + "default": "/plw/g", + "description": "The path by which to process get-based events" + }, + "postPath": { + "type": "string", + "default": "/plw/p", + "description": "The path by which to process post-based events" + }, + "redirectPath": { + "type": "string", + "default": "/plw/r", + "description": "The path by which to process redirect-based events" + } + }, + "additionalProperties": false, + "required": [ + "enabled", + "standardRoutesEnabled", + "openRedirectsEnabled", + "getPath", + "postPath", + "redirectPath" + ] + }, + "cloudevents": { + "type": "object", + "description": "CloudEvents collector configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": "true", + "description": "Whether or not to activate cloudevents tracking" + }, + "path": { + "type": "string", + "default": "/cloudevent", + "description": "The path by which to process incoming cloudevents payloads" + } + }, + "additionalProperties": false, + "required": [ + "enabled", + "path" + ] + }, + "selfDescribing": { + "type": "object", + "description": "Arbitrary self-describing events collector configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": "true", + "description": "Whether or not to activate arbitrary self-describing event tracking" + }, + "path": { + "type": "string", + "default": "/gen/bp", + "description": "The path by which to process incoming self describing payloads" + }, + "contexts": { + "type": "object", + "description": "Self describing events context config", + "properties": { + "rootKey": { + "type": "string", + "default": "contexts", + "description": "The root json key that defines event contexts" + } + }, + "additionalProperties": false, + "required": [ + "rootKey" + ] + }, + "payload": { + "type": "object", + "description": "Self describing events payload data config", + "properties": { + "rootKey": { + "type": "string", + "default": "data", + "description": "The root json key that defines payload data. (root.PAYLOADKEY)" }, - "requestLogger": { - "type": "object", - "description": "Request logger configuration", - "properties": { - "enabled": { - "type": "boolean", - "default": "true", - "description": "Whether or not to activate the json request logging middleware" - } - }, - "additionalProperties": false, - "required": [ - "enabled" - ] + "schemaKey": { + "type": "string", + "default": "schema", + "description": "The key that defines the payload schema. (root.PAYLOADKEY.SCHEMAKEY)" }, - "auth": { - "type": "object", - "description": "Auth middleware configuration", - "properties": { - "enabled": { - "type": "boolean", - "default": "true", - "description": "Whether or not to activate auth middleware" - }, - "tokens": { - "type": "array", - "default": [ - "YnV6OmJ1enp6enp6eg==" - ], - "description": "A list of tokens to allow via auth middleware", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "enabled" - ] + "dataKey": { + "type": "string", + "default": "data", + "description": "The key that defines the payload data. (root.PAYLOADKEY.DATAKEY)" } + }, + "additionalProperties": false, + "required": [ + "rootKey", + "schemaKey", + "dataKey" + ] + } + }, + "additionalProperties": false, + "required": [ + "enabled", + "path", + "contexts", + "payload" + ] + }, + "webhook": { + "type": "object", + "description": "Arbitrary webhook configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not to enable arbitrary webhooks", + "default": "true" }, - "required": [ - "timeout", - "rateLimiter", - "identity", - "cors", - "requestLogger", - "auth" + "path": { + "type": "string", + "description": "The arbitrary webhook route", + "default": "/hook" + } + }, + "additionalProperties": false, + "required": [ + "enabled", + "path" + ] + }, + "pixel": { + "type": "object", + "description": "Pixel configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not to enable 1x1 pixels", + "default": "true" + }, + "path": { + "type": "string", + "default": "/pxl", + "description": "The pixel path" + } + }, + "additionalProperties": false, + "required": [ + "enabled", + "path" + ] + } + }, + "additionalProperties": false, + "required": [ + "snowplow", + "cloudevents", + "selfDescribing", + "webhook", + "pixel" + ] + }, + "registry": { + "type": "object", + "description": "Schema registry configuration", + "properties": { + "backend": { + "type": "object", + "description": "Registry backend configuration", + "properties": { + "type": { + "type": "string", + "default": "s3", + "description": "The type of schema registry backend", + "enum": [ + "gcs", + "s3", + "minio", + "file", + "http", + "https", + "postgres", + "mysql", + "materialize", + "clickhouse", + "mongodb" + ] + }, + "path": { + "type": "string", + "default": "/", + "description": "The root path of the schema registry backend" + }, + "bucket": { + "type": "string", + "default": "buz-schemas", + "description": "The schema registry bucket, if applicable" + }, + "host": { + "type": "string", + "description": "The schema registry host, if applicable" + }, + "table": { + "type": "string", + "description": "The database table that stores schemas", + "default": "registry" + }, + "collection": { + "type": "string", + "description": "The mongodb collection for schemas in the registry backend is mongodb", + "default": "registry" + }, + "hosts": { + "type": "array", + "description": "The database host(s)", + "default": [ + "localhost" + ] + }, + "port": { + "type": "number", + "description": "The database port", + "default": 5432 + }, + "database": { + "type": "string", + "description": "The database name", + "default": "buz" + }, + "user": { + "type": "string", + "description": "The database user", + "default": "buz" + }, + "password": { + "type": "string", + "description": "The database password", + "default": "buz" + }, + "minioEndpoint": { + "type": "string", + "description": "The minio endpoint", + "default": "localhost:9000" + }, + "accessKeyId": { + "type": "string", + "description": "The access key id, used for minio and s3", + "default": "minioadmin" + }, + "secretAccessKey": { + "type": "string", + "description": "The secret access key, used for minio and s3", + "default": "minioadmin" + } + }, + "additionalProperties": false, + "required": [ + "type" + ], + "anyOf": [ + { + "properties": { + "type": { + "const": "gcs" + } + }, + "required": [ + "bucket", + "path" + ] + }, + { + "properties": { + "type": { + "const": "s3" + } + }, + "required": [ + "bucket", + "path" + ] + }, + { + "properties": { + "type": { + "const": "minio" + } + }, + "required": [ + "minioEndpoint", + "accessKeyId", + "secretAccessKey", + "bucket", + "path" + ] + }, + { + "properties": { + "type": { + "const": "http" + } + }, + "required": [ + "host", + "path" + ] + }, + { + "properties": { + "type": { + "const": "https" + } + }, + "required": [ + "host", + "path" + ] + }, + { + "properties": { + "type": { + "const": "file" + } + }, + "required": [ + "path" + ] + }, + { + "properties": { + "type": { + "const": "postgres" + } + }, + "required": [ + "hosts", + "port", + "database", + "user", + "password", + "table" + ] + }, + { + "properties": { + "type": { + "const": "mysql" + } + }, + "required": [ + "hosts", + "port", + "database", + "user", + "password", + "table" + ] + }, + { + "properties": { + "type": { + "const": "materialize" + } + }, + "required": [ + "hosts", + "port", + "database", + "user", + "password", + "table" + ] + }, + { + "properties": { + "type": { + "const": "clickhouse" + } + }, + "required": [ + "hosts", + "port", + "database", + "user", + "password", + "table" + ] + }, + { + "properties": { + "type": { + "const": "mongodb" + } + }, + "required": [ + "hosts", + "port", + "database", + "collection" + ] + } + ] + }, + "ttlSeconds": { + "type": "integer", + "default": "300", + "description": "The number of seconds to cache schemas for" + }, + "maxSizeBytes": { + "type": "integer", + "default": "104857600", + "description": "The max schema cache size, in bytes" + }, + "purge": { + "type": "object", + "description": "Registry purge configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": "false", + "description": "Whether or not to enable schema cache purge endpoints" + } + }, + "additionalProperties": false, + "required": [ + "enabled" + ] + }, + "http": { + "type": "object", + "description": "Registry http functionality", + "properties": { + "enabled": { + "type": "boolean", + "default": "true", + "description": "Whether or not to expose the registry via HTTP" + } + }, + "additionalProperties": false, + "required": [ + "enabled" + ] + } + }, + "additionalProperties": false, + "required": [ + "backend", + "ttlSeconds", + "maxSizeBytes", + "purge", + "http" + ] + }, + "sinks": { + "type": "array", + "description": "Configuration for the sinks", + "minItems": 1, + "maxItems": 20, + "items": { + "type": "object", + "description": "Configuration for an individual sink", + "properties": { + "name": { + "type": "string", + "default": "SINK-NAME", + "description": "The sink name" + }, + "type": { + "type": "string", + "default": "redpanda", + "description": "The sink configuration", + "enum": [ + "kafka", + "redpanda", + "pubsub", + "kinesis", + "kinesis-firehose", + "stdout", + "http", + "https", + "relay", + "elasticsearch", + "blackhole", + "file", + "postgres", + "pubnub", + "mongodb", + "mysql", + "materialize", + "clickhouse", + "timescale", + "nats", + "amplitude", + "eventbridge", + "splunk", + "bigquery" + ] + }, + "deliveryRequired": { + "type": "boolean", + "default": "true" + }, + "brokers": { + "type": "array", + "description": "A list of brokers", + "default": [ + "BROKER1:9092", + "BROKER2:9092", + "BROKER3:9092" + ] + }, + "project": { + "type": "string", + "default": "buz-gcp-project", + "description": "The name of the GCP project" + }, + "dataset": { + "type": "string", + "default": "buz-gcp-dataset", + "description": "The name of the BigQuery dataset" + }, + "url": { + "type": "string", + "description": "The destination url", + "default": "https://somewheres.net/buz" + }, + "hosts": { + "type": "array", + "description": "The database hostname(s)", + "default": [ + "localhost" + ] + }, + "port": { + "type": "number", + "description": "The database port", + "default": 5432 + }, + "database": { + "type": "string", + "description": "The database name", + "default": "buz" + }, + "user": { + "type": "string", + "description": "The database connection user", + "default": "buz" + }, + "password": { + "type": "string", + "description": "The database connection password", + "default": "buz" + }, + "pubnubPubKey": { + "type": "string", + "description": "The pubnub pub key", + "default": "YOUR-PUB-KEY" + }, + "pubnubSubKey": { + "type": "string", + "description": "The pubnub sub key", + "default": "YOUR-SUB-KEY" + }, + "apiKey": { + "type": "string", + "description": "The API key", + "default": "YOUR_KEY_HERE" + }, + "token": { + "type": "string", + "description": "The API token", + "default": "YOUR_TOKEN_HERE" + }, + "region": { + "type": "string", + "description": "The region", + "default": "standard", + "enum": [ + "standard", + "eu" ] + }, + "defaultOutput": { + "type": "string", + "description": "Where good events go (by default).", + "default": "buz_events" + }, + "deadletterOutput": { + "type": "string", + "description": "Where the bad events go (otherwise known as purgatory).", + "default": "buz_invalid_events" + } }, - "inputs": { - "type": "object", - "description": "Input configuration", + "additionalProperties": false, + "required": [ + "name", + "type", + "deliveryRequired", + "defaultOutput", + "deadletterOutput" + ], + "anyOf": [ + { "properties": { - "snowplow": { - "type": "object", - "description": "Snowplow collector configuration", - "properties": { - "enabled": { - "type": "boolean", - "default": "true", - "description": "Whether or not to activate snowplow tracking" - }, - "standardRoutesEnabled": { - "type": "boolean", - "default": "true", - "description": "Whether to not to activate the standard snowplow routes" - }, - "openRedirectsEnabled": { - "type": "boolean", - "default": "true", - "description": "Whether or not to activate redirect-based tracking" - }, - "getPath": { - "type": "string", - "default": "/plw/g", - "description": "The path by which to process get-based events" - }, - "postPath": { - "type": "string", - "default": "/plw/p", - "description": "The path by which to process post-based events" - }, - "redirectPath": { - "type": "string", - "default": "/plw/r", - "description": "The path by which to process redirect-based events" - } - }, - "additionalProperties": false, - "required": [ - "enabled", - "standardRoutesEnabled", - "openRedirectsEnabled", - "getPath", - "postPath", - "redirectPath" - ] - }, - "cloudevents": { - "type": "object", - "description": "CloudEvents collector configuration", - "properties": { - "enabled": { - "type": "boolean", - "default": "true", - "description": "Whether or not to activate cloudevents tracking" - }, - "path": { - "type": "string", - "default": "/cloudevent", - "description": "The path by which to process incoming cloudevents payloads" - } - }, - "additionalProperties": false, - "required": [ - "enabled", - "path" - ] - }, - "selfDescribing": { - "type": "object", - "description": "Arbitrary self-describing events collector configuration", - "properties": { - "enabled": { - "type": "boolean", - "default": "true", - "description": "Whether or not to activate arbitrary self-describing event tracking" - }, - "path": { - "type": "string", - "default": "/gen/bp", - "description": "The path by which to process incoming self describing payloads" - }, - "contexts": { - "type": "object", - "description": "Self describing events context config", - "properties": { - "rootKey": { - "type": "string", - "default": "contexts", - "description": "The root json key that defines event contexts" - } - }, - "additionalProperties": false, - "required": [ - "rootKey" - ] - }, - "payload": { - "type": "object", - "description": "Self describing events payload data config", - "properties": { - "rootKey": { - "type": "string", - "default": "data", - "description": "The root json key that defines payload data. (root.PAYLOADKEY)" - }, - "schemaKey": { - "type": "string", - "default": "schema", - "description": "The key that defines the payload schema. (root.PAYLOADKEY.SCHEMAKEY)" - }, - "dataKey": { - "type": "string", - "default": "data", - "description": "The key that defines the payload data. (root.PAYLOADKEY.DATAKEY)" - } - }, - "additionalProperties": false, - "required": [ - "rootKey", - "schemaKey", - "dataKey" - ] - } - }, - "additionalProperties": false, - "required": [ - "enabled", - "path", - "contexts", - "payload" - ] - }, - "webhook": { - "type": "object", - "description": "Arbitrary webhook configuration", - "properties": { - "enabled": { - "type": "boolean", - "description": "Whether or not to enable arbitrary webhooks", - "default": "true" - }, - "path": { - "type": "string", - "description": "The arbitrary webhook route", - "default": "/hook" - } - }, - "additionalProperties": false, - "required": [ - "enabled", - "path" - ] - }, - "pixel": { - "type": "object", - "description": "Pixel configuration", - "properties": { - "enabled": { - "type": "boolean", - "description": "Whether or not to enable 1x1 pixels", - "default": "true" - }, - "path": { - "type": "string", - "default": "/pxl", - "description": "The pixel path" - } - }, - "additionalProperties": false, - "required": [ - "enabled", - "path" - ] - } + "type": { + "const": "stdout" + } + }, + "required": [] + }, + { + "properties": { + "type": { + "const": "kafka" + } }, - "additionalProperties": false, "required": [ - "snowplow", - "cloudevents", - "selfDescribing", - "webhook", - "pixel" + "brokers" ] - }, - "registry": { - "type": "object", - "description": "Schema registry configuration", + }, + { "properties": { - "backend": { - "type": "object", - "description": "Registry backend configuration", - "properties": { - "type": { - "type": "string", - "default": "s3", - "description": "The type of schema registry backend", - "enum": [ - "gcs", - "s3", - "minio", - "file", - "http", - "https", - "postgres", - "mysql", - "materialize", - "clickhouse", - "mongodb" - ] - }, - "path": { - "type": "string", - "default": "/", - "description": "The root path of the schema registry backend" - }, - "bucket": { - "type": "string", - "default": "buz-schemas", - "description": "The schema registry bucket, if applicable" - }, - "host": { - "type": "string", - "description": "The schema registry host, if applicable" - }, - "table": { - "type": "string", - "description": "The database table that stores schemas", - "default": "registry" - }, - "collection": { - "type": "string", - "description": "The mongodb collection for schemas in the registry backend is mongodb", - "default": "registry" - }, - "hosts": { - "type": "array", - "description": "The database host(s)", - "default": [ - "localhost" - ] - }, - "port": { - "type": "number", - "description": "The database port", - "default": 5432 - }, - "database": { - "type": "string", - "description": "The database name", - "default": "buz" - }, - "user": { - "type": "string", - "description": "The database user", - "default": "buz" - }, - "password": { - "type": "string", - "description": "The database password", - "default": "buz" - }, - "minioEndpoint": { - "type": "string", - "description": "The minio endpoint", - "default": "localhost:9000" - }, - "accessKeyId": { - "type": "string", - "description": "The access key id, used for minio and s3", - "default": "minioadmin" - }, - "secretAccessKey": { - "type": "string", - "description": "The secret access key, used for minio and s3", - "default": "minioadmin" - } - }, - "additionalProperties": false, - "required": [ - "type" - ], - "anyOf": [ - { - "properties": { - "type": { - "const": "gcs" - } - }, - "required": [ - "bucket", - "path" - ] - }, - { - "properties": { - "type": { - "const": "s3" - } - }, - "required": [ - "bucket", - "path" - ] - }, - { - "properties": { - "type": { - "const": "minio" - } - }, - "required": [ - "minioEndpoint", - "accessKeyId", - "secretAccessKey", - "bucket", - "path" - ] - }, - { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "host", - "path" - ] - }, - { - "properties": { - "type": { - "const": "https" - } - }, - "required": [ - "host", - "path" - ] - }, - { - "properties": { - "type": { - "const": "file" - } - }, - "required": [ - "path" - ] - }, - { - "properties": { - "type": { - "const": "postgres" - } - }, - "required": [ - "hosts", - "port", - "database", - "user", - "password", - "table" - ] - }, - { - "properties": { - "type": { - "const": "mysql" - } - }, - "required": [ - "hosts", - "port", - "database", - "user", - "password", - "table" - ] - }, - { - "properties": { - "type": { - "const": "materialize" - } - }, - "required": [ - "hosts", - "port", - "database", - "user", - "password", - "table" - ] - }, - { - "properties": { - "type": { - "const": "clickhouse" - } - }, - "required": [ - "hosts", - "port", - "database", - "user", - "password", - "table" - ] - }, - { - "properties": { - "type": { - "const": "mongodb" - } - }, - "required": [ - "hosts", - "port", - "database", - "collection" - ] - } - ] - }, - "ttlSeconds": { - "type": "integer", - "default": "300", - "description": "The number of seconds to cache schemas for" - }, - "maxSizeBytes": { - "type": "integer", - "default": "104857600", - "description": "The max schema cache size, in bytes" - }, - "purge": { - "type": "object", - "description": "Registry purge configuration", - "properties": { - "enabled": { - "type": "boolean", - "default": "false", - "description": "Whether or not to enable schema cache purge endpoints" - } - }, - "additionalProperties": false, - "required": [ - "enabled" - ] - }, - "http": { - "type": "object", - "description": "Registry http functionality", - "properties": { - "enabled": { - "type": "boolean", - "default": "true", - "description": "Whether or not to expose the registry via HTTP" - } - }, - "additionalProperties": false, - "required": [ - "enabled" - ] - } + "type": { + "const": "redpanda" + } }, - "additionalProperties": false, "required": [ - "backend", - "ttlSeconds", - "maxSizeBytes", - "purge", - "http" + "brokers" ] - }, - "sinks": { - "type": "array", - "description": "Configuration for the sinks", - "minItems": 1, - "maxItems": 20, - "items": { - "type": "object", - "description": "Configuration for an individual sink", - "properties": { - "name": { - "type": "string", - "default": "SINK-NAME", - "description": "The sink name" - }, - "type": { - "type": "string", - "default": "redpanda", - "description": "The sink configuration", - "enum": [ - "kafka", - "redpanda", - "pubsub", - "kinesis", - "kinesis-firehose", - "stdout", - "http", - "https", - "relay", - "elasticsearch", - "blackhole", - "file", - "postgres", - "pubnub", - "mongodb", - "mysql", - "materialize", - "clickhouse", - "timescale", - "nats", - "amplitude", - "eventbridge", - "splunk", - "bigquery" - ] - }, - "deliveryRequired": { - "type": "boolean", - "default": "true" - }, - "brokers": { - "type": "array", - "description": "A list of brokers", - "default": [ - "BROKER1:9092", - "BROKER2:9092", - "BROKER3:9092" - ] - }, - "project": { - "type": "string", - "default": "buz-gcp-project", - "description": "The name of the GCP project" - }, - "dataset": { - "type": "string", - "default": "buz-gcp-dataset", - "description": "The name of the BigQuery dataset" - }, - "url": { - "type": "string", - "description": "The destination url", - "default": "https://somewheres.net/buz" - }, - "hosts": { - "type": "array", - "description": "The database hostname(s)", - "default": [ - "localhost" - ] - }, - "port": { - "type": "number", - "description": "The database port", - "default": 5432 - }, - "database": { - "type": "string", - "description": "The database name", - "default": "buz" - }, - "user": { - "type": "string", - "description": "The database connection user", - "default": "buz" - }, - "password": { - "type": "string", - "description": "The database connection password", - "default": "buz" - }, - "pubnubPubKey": { - "type": "string", - "description": "The pubnub pub key", - "default": "YOUR-PUB-KEY" - }, - "pubnubSubKey": { - "type": "string", - "description": "The pubnub sub key", - "default": "YOUR-SUB-KEY" - }, - "apiKey": { - "type": "string", - "description": "The API key", - "default": "YOUR_KEY_HERE" - }, - "token": { - "type": "string", - "description": "The API token", - "default": "YOUR_TOKEN_HERE" - }, - "region": { - "type": "string", - "description": "The region", - "default": "standard", - "enum": [ - "standard", - "eu" - ] - }, - "defaultOutput": { - "type": "string", - "description": "Where good events go (by default).", - "default": "buz_events" - }, - "deadletterOutput": { - "type": "string", - "description": "Where the bad events go (otherwise known as purgatory).", - "default": "buz_invalid_events" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "deliveryRequired", - "defaultOutput", - "deadletterOutput" - ], - "anyOf": [ - { - "properties": { - "type": { - "const": "stdout" - } - }, - "required": [] - }, - { - "properties": { - "type": { - "const": "kafka" - } - }, - "required": [ - "brokers" - ] - }, - { - "properties": { - "type": { - "const": "redpanda" - } - }, - "required": [ - "brokers" - ] - }, - { - "properties": { - "type": { - "const": "pubsub" - } - }, - "required": [ - "project" - ] - }, - { - "properties": { - "type": { - "const": "kinesis" - } - }, - "required": [] - }, - { - "properties": { - "type": { - "const": "kinesis-firehose" - } - }, - "required": [] - }, - { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "url" - ] - }, - { - "properties": { - "type": { - "const": "https" - } - }, - "required": [ - "url" - ] - }, - { - "properties": { - "type": { - "const": "relay" - } - }, - "required": [ - "relayUrl" - ] - }, - { - "properties": { - "type": { - "const": "elasticsearch" - } - }, - "required": [ - "hosts", - "user", - "password" - ] - }, - { - "properties": { - "type": { - "const": "blackhole" - } - }, - "required": [] - }, - { - "properties": { - "type": { - "const": "file" - } - }, - "required": [] - }, - { - "properties": { - "type": { - "const": "postgres" - } - }, - "required": [ - "hosts", - "port", - "database", - "user", - "password" - ] - }, - { - "properties": { - "type": { - "const": "materialize" - } - }, - "required": [ - "hosts", - "port", - "database", - "user", - "password" - ] - }, - { - "properties": { - "type": { - "const": "timescale" - } - }, - "required": [ - "hosts", - "port", - "database", - "user", - "password" - ] - }, - { - "properties": { - "type": { - "const": "mysql" - } - }, - "required": [ - "hosts", - "port", - "database", - "user", - "password" - ] - }, - { - "properties": { - "type": { - "const": "clickhouse" - } - }, - "required": [ - "hosts", - "port", - "database", - "user", - "password" - ] - }, - { - "properties": { - "type": { - "const": "pubnub" - } - }, - "required": [ - "pubnubPubKey", - "pubnubSubKey" - ] - }, - { - "properties": { - "type": { - "const": "mongodb" - } - }, - "required": [ - "hosts" - ] - }, - { - "properties": { - "type": { - "const": "nats" - } - }, - "required": [ - "hosts", - "user", - "password" - ] - }, - { - "properties": { - "type": { - "const": "nats-jetstream" - } - }, - "required": [ - "hosts", - "user", - "password" - ] - }, - { - "properties": { - "type": { - "const": "splunk" - } - }, - "required": [ - "url", - "apiKey" - ] - }, - { - "properties": { - "type": { - "const": "bigquery" - } - }, - "required": [ - "project", - "dataset" - ] - } - ] - } - }, - "squawkBox": { - "type": "object", - "description": "Squawkbox configuration", + }, + { "properties": { - "enabled": { - "type": "boolean", - "description": "Whether or not to enable the squawkbox", - "default": "true" - } + "type": { + "const": "pubsub" + } }, - "additionalProperties": false, "required": [ - "enabled" + "project" ] - }, - "tele": { - "type": "object", - "description": "Tele configuration", + }, + { "properties": { - "enabled": { - "type": "boolean", - "description": "Whether or not to enable telemetry", - "default": "true" - }, - "host": {} + "type": { + "const": "kinesis" + } + }, + "required": [] + }, + { + "properties": { + "type": { + "const": "kinesis-firehose" + } + }, + "required": [] + }, + { + "properties": { + "type": { + "const": "http" + } + }, + "required": [ + "url" + ] + }, + { + "properties": { + "type": { + "const": "https" + } + }, + "required": [ + "url" + ] + }, + { + "properties": { + "type": { + "const": "relay" + } + }, + "required": [ + "relayUrl" + ] + }, + { + "properties": { + "type": { + "const": "elasticsearch" + } + }, + "required": [ + "hosts", + "user", + "password" + ] + }, + { + "properties": { + "type": { + "const": "blackhole" + } + }, + "required": [] + }, + { + "properties": { + "type": { + "const": "file" + } + }, + "required": [] + }, + { + "properties": { + "type": { + "const": "postgres" + } + }, + "required": [ + "hosts", + "port", + "database", + "user", + "password" + ] + }, + { + "properties": { + "type": { + "const": "materialize" + } + }, + "required": [ + "hosts", + "port", + "database", + "user", + "password" + ] + }, + { + "properties": { + "type": { + "const": "timescale" + } + }, + "required": [ + "hosts", + "port", + "database", + "user", + "password" + ] + }, + { + "properties": { + "type": { + "const": "mysql" + } + }, + "required": [ + "hosts", + "port", + "database", + "user", + "password" + ] + }, + { + "properties": { + "type": { + "const": "clickhouse" + } }, - "additionalProperties": false, "required": [ - "enabled" + "hosts", + "port", + "database", + "user", + "password" ] + }, + { + "properties": { + "type": { + "const": "pubnub" + } + }, + "required": [ + "pubnubPubKey", + "pubnubSubKey" + ] + }, + { + "properties": { + "type": { + "const": "mongodb" + } + }, + "required": [ + "hosts" + ] + }, + { + "properties": { + "type": { + "const": "nats" + } + }, + "required": [ + "hosts", + "user", + "password" + ] + }, + { + "properties": { + "type": { + "const": "nats-jetstream" + } + }, + "required": [ + "hosts", + "user", + "password" + ] + }, + { + "properties": { + "type": { + "const": "splunk" + } + }, + "required": [ + "url", + "apiKey" + ] + }, + { + "properties": { + "type": { + "const": "bigquery" + } + }, + "required": [ + "project", + "dataset" + ] + } + ] + } + }, + "squawkBox": { + "type": "object", + "description": "Squawkbox configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not to enable the squawkbox", + "default": "true" } + }, + "additionalProperties": false, + "required": [ + "enabled" + ] }, - "additionalProperties": false, - "required": [ - "version", - "app", - "middleware", - "inputs", - "registry", - "sinks", - "squawkBox", - "tele" - ] -} \ No newline at end of file + "tele": { + "type": "object", + "description": "Tele configuration", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not to enable telemetry", + "default": "true" + }, + "host": {} + }, + "additionalProperties": false, + "required": [ + "enabled" + ] + } + }, + "additionalProperties": false, + "required": [ + "version", + "app", + "middleware", + "inputs", + "registry", + "sinks", + "squawkBox", + "tele" + ] +}