From 0b395eb2492f295654f46ccabb8f6ba2ec97fbb3 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 5 Feb 2026 11:50:52 +0200 Subject: [PATCH 01/10] feat: add external to osm tag mapping v1 schema --- .../externalToOsmTagMapping/v1.schema.json | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 schemas/vector/externalToOsmTagMapping/v1.schema.json diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json new file mode 100644 index 00000000..01c29da6 --- /dev/null +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -0,0 +1,59 @@ +{ + "$id": "https://mapcolonies.com/vector/externalToOsmTagMapping/v1", + "type": "object", + "title": "vectorexternalToOsmTagMappingSchemaV1", + "description": "Vector's external To OSM Tag Mapping schema", + "allOf": [ + { + "$ref": "https://mapcolonies.com/common/boilerplate/v2" + }, + { + "$ref": "#/definitions/databases" + }, + { + "$ref": "#/definitions/appSchema" + } + ], + "definitions": { + "databases": { + "type": "object", + "required": ["redis", "timeout"], + "properties": { + "redis": { + "$ref": "https://mapcolonies.com/common/redis/v2" + }, + "timeout": { + "type": "number", + "description": "Database timeout", + "x-env-value": "DB_TIMEOUT" + } + } + }, + "appSchema": { + "type": "object", + "required": ["application"], + "properties": { + "application": { + "type": "object", + "required": ["services"], + "properties": { + "services": { + "type": "object", + "required": ["enabled"], + "properties": { + "value": { + "type": "string", + "x-env-value": "APP_HASHKEY_VALUE" + }, + "enabled": { + "type": "boolean", + "x-env-value": "APP_HASHKEY_ENABLED" + } + } + } + } + } + } + } + } +} From 31ce79a324ade0dfe1b3bc2c1c88d623426e8142 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 5 Feb 2026 12:00:08 +0200 Subject: [PATCH 02/10] fix: add redis schema reference --- .../externalToOsmTagMapping/v1.schema.json | 61 ++++++++++--------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index 01c29da6..bc04a0e5 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -1,37 +1,48 @@ { "$id": "https://mapcolonies.com/vector/externalToOsmTagMapping/v1", "type": "object", - "title": "vectorexternalToOsmTagMappingSchemaV1", - "description": "Vector's external To OSM Tag Mapping schema", "allOf": [ - { - "$ref": "https://mapcolonies.com/common/boilerplate/v2" - }, - { - "$ref": "#/definitions/databases" - }, - { - "$ref": "#/definitions/appSchema" - } + { "$ref": "https://mapcolonies.com/common/boilerplate/v2" }, + { "$ref": "#/definitions/databases" }, + { "$ref": "#/definitions/appSchema" } ], "definitions": { "databases": { "type": "object", - "required": ["redis", "timeout"], "properties": { - "redis": { - "$ref": "https://mapcolonies.com/common/redis/v2" - }, - "timeout": { - "type": "number", - "description": "Database timeout", - "x-env-value": "DB_TIMEOUT" + "db": { + "type": "object", + "required": ["redis", "timeout"], + "properties": { + "timeout": { + "type": "number", + "x-env-value": "DB_TIMEOUT", + "default": 5000 + }, + "redis": { + "allOf": [ + { "$ref": "https://mapcolonies.com/common/redis/v2" }, + { + "type": "object", + "properties": { + "keyPrefix": { + "type": "string", + "x-env-value": "REDIS_KEY_PREFIX" + }, + "connectTimeout": { + "type": "number", + "x-env-value": "REDIS_CONNECT_TIMEOUT" + } + } + } + ] + } + } } } }, "appSchema": { "type": "object", - "required": ["application"], "properties": { "application": { "type": "object", @@ -41,14 +52,8 @@ "type": "object", "required": ["enabled"], "properties": { - "value": { - "type": "string", - "x-env-value": "APP_HASHKEY_VALUE" - }, - "enabled": { - "type": "boolean", - "x-env-value": "APP_HASHKEY_ENABLED" - } + "enabled": { "type": "boolean", "x-env-value": "APP_HASHKEY_ENABLED" }, + "value": { "type": "string", "x-env-value": "APP_HASHKEY_VALUE" } } } } From 755d76bd194665df3ecc1c22ef92acf9efe726ea Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 5 Feb 2026 12:13:24 +0200 Subject: [PATCH 03/10] fix: add titles to work with ts unsafe assignments --- schemas/vector/externalToOsmTagMapping/v1.schema.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index bc04a0e5..8dad09dc 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -1,6 +1,8 @@ { "$id": "https://mapcolonies.com/vector/externalToOsmTagMapping/v1", "type": "object", + "title": "vectorExternalToOsmTagMappingV1", + "description": "Mapping configuration for external vector data to OSM tags", "allOf": [ { "$ref": "https://mapcolonies.com/common/boilerplate/v2" }, { "$ref": "#/definitions/databases" }, @@ -20,6 +22,7 @@ "default": 5000 }, "redis": { + "title": "RedisConfig", "allOf": [ { "$ref": "https://mapcolonies.com/common/redis/v2" }, { From 2b1e59ea1e4fcf1937e99335b834e581b2c86a3e Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 5 Feb 2026 12:27:03 +0200 Subject: [PATCH 04/10] fix: require values for better typing --- .../vector/externalToOsmTagMapping/v1.schema.json | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index 8dad09dc..3485bad1 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -14,15 +14,12 @@ "properties": { "db": { "type": "object", - "required": ["redis", "timeout"], + "required": ["redis"], "properties": { - "timeout": { - "type": "number", - "x-env-value": "DB_TIMEOUT", - "default": 5000 - }, "redis": { "title": "RedisConfig", + "type": "object", + "required": ["keyPrefix", "connectTimeout"], "allOf": [ { "$ref": "https://mapcolonies.com/common/redis/v2" }, { @@ -30,11 +27,13 @@ "properties": { "keyPrefix": { "type": "string", - "x-env-value": "REDIS_KEY_PREFIX" + "x-env-value": "REDIS_KEY_PREFIX", + "default": "" }, "connectTimeout": { "type": "number", - "x-env-value": "REDIS_CONNECT_TIMEOUT" + "x-env-value": "REDIS_CONNECT_TIMEOUT", + "default": 5000 } } } From cbc79bae901d4d7f49edad86d546257c63df6f29 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 5 Feb 2026 14:11:26 +0200 Subject: [PATCH 05/10] fix: fix app schema properties --- schemas/vector/externalToOsmTagMapping/v1.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index 3485bad1..a926a937 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -48,9 +48,9 @@ "properties": { "application": { "type": "object", - "required": ["services"], + "required": ["hashKey"], "properties": { - "services": { + "hashKey": { "type": "object", "required": ["enabled"], "properties": { From 8e49cce1d8d5d69afccd4a21860a91c0f71509a5 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 5 Feb 2026 14:44:01 +0200 Subject: [PATCH 06/10] fix: make tls optional --- .../vector/externalToOsmTagMapping/v1.schema.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index a926a937..9a4d0a18 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -34,8 +34,19 @@ "type": "number", "x-env-value": "REDIS_CONNECT_TIMEOUT", "default": 5000 + }, + "tls": { + "type": "object", + "description": "TLS configuration (omit to disable)", + "required": ["ca", "cert", "key"], + "properties": { + "ca": { "type": "string", "x-env-value": "REDIS_CA_PATH" }, + "cert": { "type": "string", "x-env-value": "REDIS_CERT_PATH" }, + "key": { "type": "string", "x-env-value": "REDIS_KEY_PATH" } + } } - } + }, + "required": [] } ] } From 894058553d9f7a68cd32622fb59b51dd751a9c97 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 5 Feb 2026 14:53:22 +0200 Subject: [PATCH 07/10] fix: make tls actually optional --- .../externalToOsmTagMapping/v1.schema.json | 51 +++++++++---------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index 9a4d0a18..921ef34c 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -19,36 +19,33 @@ "redis": { "title": "RedisConfig", "type": "object", - "required": ["keyPrefix", "connectTimeout"], - "allOf": [ - { "$ref": "https://mapcolonies.com/common/redis/v2" }, - { + "required": ["host", "port", "username", "password", "keyPrefix", "connectTimeout"], + "properties": { + "host": { "type": "string", "x-env-value": "REDIS_HOST" }, + "port": { "type": "integer", "default": 6379, "x-env-value": "REDIS_PORT" }, + "username": { "type": "string", "x-env-value": "REDIS_USERNAME" }, + "password": { "type": "string", "x-env-value": "REDIS_PASSWORD" }, + "keyPrefix": { + "type": "string", + "x-env-value": "REDIS_KEY_PREFIX", + "default": "" + }, + "connectTimeout": { + "type": "number", + "x-env-value": "REDIS_CONNECT_TIMEOUT", + "default": 5000 + }, + "tls": { "type": "object", + "description": "TLS configuration (omit to disable)", + "required": ["ca", "cert", "key"], "properties": { - "keyPrefix": { - "type": "string", - "x-env-value": "REDIS_KEY_PREFIX", - "default": "" - }, - "connectTimeout": { - "type": "number", - "x-env-value": "REDIS_CONNECT_TIMEOUT", - "default": 5000 - }, - "tls": { - "type": "object", - "description": "TLS configuration (omit to disable)", - "required": ["ca", "cert", "key"], - "properties": { - "ca": { "type": "string", "x-env-value": "REDIS_CA_PATH" }, - "cert": { "type": "string", "x-env-value": "REDIS_CERT_PATH" }, - "key": { "type": "string", "x-env-value": "REDIS_KEY_PATH" } - } - } - }, - "required": [] + "ca": { "type": "string", "x-env-value": "REDIS_CA_PATH" }, + "cert": { "type": "string", "x-env-value": "REDIS_CERT_PATH" }, + "key": { "type": "string", "x-env-value": "REDIS_KEY_PATH" } + } } - ] + } } } } From a6b538ceaa025d2dcefd60f86883d2f751f05e2c Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 5 Feb 2026 17:04:53 +0200 Subject: [PATCH 08/10] fix: fix connect timeout naming and minimum --- schemas/vector/externalToOsmTagMapping/v1.schema.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index 921ef34c..f6ca008e 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -19,7 +19,7 @@ "redis": { "title": "RedisConfig", "type": "object", - "required": ["host", "port", "username", "password", "keyPrefix", "connectTimeout"], + "required": ["host", "port", "username", "password", "keyPrefix", "connectTimeoutMs"], "properties": { "host": { "type": "string", "x-env-value": "REDIS_HOST" }, "port": { "type": "integer", "default": 6379, "x-env-value": "REDIS_PORT" }, @@ -30,10 +30,11 @@ "x-env-value": "REDIS_KEY_PREFIX", "default": "" }, - "connectTimeout": { + "connectTimeoutMs": { "type": "number", "x-env-value": "REDIS_CONNECT_TIMEOUT", - "default": 5000 + "default": 5000, + "minimum": 500 }, "tls": { "type": "object", From c7e351a7cc03c02b6b154a21bc2aacbf6d79a2ad Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 5 Feb 2026 17:18:28 +0200 Subject: [PATCH 09/10] fix: reference redis schema --- .../externalToOsmTagMapping/v1.schema.json | 39 ++++++------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index f6ca008e..fd9090c0 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -17,36 +17,21 @@ "required": ["redis"], "properties": { "redis": { - "title": "RedisConfig", - "type": "object", - "required": ["host", "port", "username", "password", "keyPrefix", "connectTimeoutMs"], - "properties": { - "host": { "type": "string", "x-env-value": "REDIS_HOST" }, - "port": { "type": "integer", "default": 6379, "x-env-value": "REDIS_PORT" }, - "username": { "type": "string", "x-env-value": "REDIS_USERNAME" }, - "password": { "type": "string", "x-env-value": "REDIS_PASSWORD" }, - "keyPrefix": { - "type": "string", - "x-env-value": "REDIS_KEY_PREFIX", - "default": "" - }, - "connectTimeoutMs": { - "type": "number", - "x-env-value": "REDIS_CONNECT_TIMEOUT", - "default": 5000, - "minimum": 500 - }, - "tls": { + "allOf": [ + { "$ref": "https://mapcolonies.com/common/redis/v2" }, + { "type": "object", - "description": "TLS configuration (omit to disable)", - "required": ["ca", "cert", "key"], "properties": { - "ca": { "type": "string", "x-env-value": "REDIS_CA_PATH" }, - "cert": { "type": "string", "x-env-value": "REDIS_CERT_PATH" }, - "key": { "type": "string", "x-env-value": "REDIS_KEY_PATH" } - } + "connectTimeoutMs": { + "type": "number", + "x-env-value": "REDIS_CONNECT_TIMEOUT", + "default": 5000, + "minimum": 500 + } + }, + "required": ["connectTimeoutMs"] } - } + ] } } } From d33f6e93a5e69789b04d95d864f5eb144bf89a58 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Wed, 11 Feb 2026 18:04:39 +0200 Subject: [PATCH 10/10] fix: add schema config to schema --- schemas/vector/externalToOsmTagMapping/v1.schema.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index fd9090c0..b008ee7f 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -53,6 +53,13 @@ } } } + }, + "schema": { + "type": "object", + "properties": { + "provider": { "type": "string", "x-env-value": "SCHEMA_PROVIDER" }, + "filePath": { "type": "string", "x-env-value": "SCHEMA_FILE_PATH" } + } } } }