From 0b395eb2492f295654f46ccabb8f6ba2ec97fbb3 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 5 Feb 2026 11:50:52 +0200 Subject: [PATCH 01/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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/15] 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" } + } } } } From bd76e735bb5d1d705dd2aed6062d8ae227b82850 Mon Sep 17 00:00:00 2001 From: Eyal Rozen Date: Sun, 15 Feb 2026 13:35:06 +0200 Subject: [PATCH 11/15] fix: make application and schema required --- schemas/vector/externalToOsmTagMapping/v1.schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index b008ee7f..f1f50e45 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -38,6 +38,7 @@ } }, "appSchema": { + "required":["application","schema"], "type": "object", "properties": { "application": { From 858799356a71d019209cb7d0544073eea575d3a9 Mon Sep 17 00:00:00 2001 From: Eyal Rozen Date: Sun, 15 Feb 2026 19:34:01 +0200 Subject: [PATCH 12/15] fix: remove unnecessary db nesting --- schemas/vector/externalToOsmTagMapping/v1.schema.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index f1f50e45..6d43d8ed 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -12,9 +12,6 @@ "databases": { "type": "object", "properties": { - "db": { - "type": "object", - "required": ["redis"], "properties": { "redis": { "allOf": [ @@ -33,7 +30,7 @@ } ] } - } + } } }, From d044cc3a5043d18b5e31d8d77165656c13e3b07f Mon Sep 17 00:00:00 2001 From: Eyal Rozen Date: Sun, 15 Feb 2026 19:36:27 +0200 Subject: [PATCH 13/15] fix: fix nesting in redis --- .../externalToOsmTagMapping/v1.schema.json | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index 6d43d8ed..81df45c2 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -9,31 +9,28 @@ { "$ref": "#/definitions/appSchema" } ], "definitions": { - "databases": { - "type": "object", - "properties": { - "properties": { - "redis": { - "allOf": [ - { "$ref": "https://mapcolonies.com/common/redis/v2" }, - { - "type": "object", - "properties": { - "connectTimeoutMs": { - "type": "number", - "x-env-value": "REDIS_CONNECT_TIMEOUT", - "default": 5000, - "minimum": 500 - } - }, - "required": ["connectTimeoutMs"] - } - ] - } - - } + "databases": { + "type": "object", + "properties": { + "redis": { + "allOf": [ + { "$ref": "https://mapcolonies.com/common/redis/v2" }, + { + "type": "object", + "properties": { + "connectTimeoutMs": { + "type": "number", + "x-env-value": "REDIS_CONNECT_TIMEOUT", + "default": 5000, + "minimum": 500 + } + }, + "required": ["connectTimeoutMs"] + } + ] } - }, + } + }, "appSchema": { "required":["application","schema"], "type": "object", From 66b904dc5771995ae03d3c92394f2632d853faae Mon Sep 17 00:00:00 2001 From: Eyal Rozen Date: Sun, 15 Feb 2026 19:39:58 +0200 Subject: [PATCH 14/15] fix: make value required if enabled --- .../externalToOsmTagMapping/v1.schema.json | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index 81df45c2..01316927 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -43,8 +43,20 @@ "type": "object", "required": ["enabled"], "properties": { - "enabled": { "type": "boolean", "x-env-value": "APP_HASHKEY_ENABLED" }, - "value": { "type": "string", "x-env-value": "APP_HASHKEY_VALUE" } + "enabled": { + "type": "boolean", + "x-env-value": "APP_HASHKEY_ENABLED" + }, + "value": { + "type": "string", + "x-env-value": "APP_HASHKEY_VALUE" + } + }, + "if": { + "properties": { "enabled": { "const": true } } + }, + "then": { + "required": ["value"] } } } From edc7d5b235aca8a9555bffe103c956c0388c7c25 Mon Sep 17 00:00:00 2001 From: Eyal Rozen Date: Sun, 15 Feb 2026 19:44:54 +0200 Subject: [PATCH 15/15] fix: require redis --- schemas/vector/externalToOsmTagMapping/v1.schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/schemas/vector/externalToOsmTagMapping/v1.schema.json b/schemas/vector/externalToOsmTagMapping/v1.schema.json index 01316927..68a58588 100644 --- a/schemas/vector/externalToOsmTagMapping/v1.schema.json +++ b/schemas/vector/externalToOsmTagMapping/v1.schema.json @@ -11,6 +11,7 @@ "definitions": { "databases": { "type": "object", + "required": ["redis"], "properties": { "redis": { "allOf": [