From 3c7a47485b747f432df84ad00de5a68096fd2cb3 Mon Sep 17 00:00:00 2001 From: Eyal Rozen Date: Sun, 29 Mar 2026 15:50:33 +0300 Subject: [PATCH 01/14] feat: add ivs schema --- schemas/vector/ivsApi/v1.schema.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 schemas/vector/ivsApi/v1.schema.json diff --git a/schemas/vector/ivsApi/v1.schema.json b/schemas/vector/ivsApi/v1.schema.json new file mode 100644 index 00000000..a39af5f0 --- /dev/null +++ b/schemas/vector/ivsApi/v1.schema.json @@ -0,0 +1,14 @@ +{ + "$id": "https://mapcolonies.com/vector/ivsApi/v1", + "type": "object", + "title": "vectorIvsApiSchemaV1", + "description": "Vector's IVS API schema", + "allOf": [ + { + "$ref": "https://mapcolonies.com/common/boilerplate/v2" + }, + { + "$ref": "https://mapcolonies.com/common/db/full/v2" + } + ] +} From 63728f5928fa94e355257dc3c15605e71adfbc6f Mon Sep 17 00:00:00 2001 From: Eyal Rozen Date: Sun, 29 Mar 2026 16:02:46 +0300 Subject: [PATCH 02/14] fix: require db --- schemas/vector/ivsApi/v1.schema.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/schemas/vector/ivsApi/v1.schema.json b/schemas/vector/ivsApi/v1.schema.json index a39af5f0..b0402b8c 100644 --- a/schemas/vector/ivsApi/v1.schema.json +++ b/schemas/vector/ivsApi/v1.schema.json @@ -8,7 +8,13 @@ "$ref": "https://mapcolonies.com/common/boilerplate/v2" }, { - "$ref": "https://mapcolonies.com/common/db/full/v2" + "type": "object", + "required": ["db"], + "properties": { + "db": { + "$ref": "https://mapcolonies.com/common/db/full/v2" + } + } } ] } From 409218015b6e363ad5de8d45a74050a2f202fd22 Mon Sep 17 00:00:00 2001 From: Eyal Rozen Date: Mon, 30 Mar 2026 11:50:16 +0300 Subject: [PATCH 03/14] fix: add db type to schema --- package-lock.json | 5 ----- schemas/vector/ivsApi/v1.schema.json | 24 ++++++++++++++++++++++-- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4c16f619..2f03af23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -905,7 +905,6 @@ "integrity": "sha512-ne4A0IpG3+2ETuREInjPNhUGis1SFjv1d5asp8MzEAGtOZeTeHVDOYqOgqfhvseqg/iXty2hjBf1zAOb7RNiNw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -916,7 +915,6 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -1157,7 +1155,6 @@ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -1883,7 +1880,6 @@ "integrity": "sha512-quyMrVt6svPS7CjQ9gKb3GLEX/rl3BCL2oa/QkNcXv4YNVBC9olt3s+H7ukto06q7B1Qz46PbrKLO34PR6vXcA==", "dev": true, "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -2281,7 +2277,6 @@ "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/schemas/vector/ivsApi/v1.schema.json b/schemas/vector/ivsApi/v1.schema.json index b0402b8c..46898da7 100644 --- a/schemas/vector/ivsApi/v1.schema.json +++ b/schemas/vector/ivsApi/v1.schema.json @@ -8,13 +8,33 @@ "$ref": "https://mapcolonies.com/common/boilerplate/v2" }, { + "$ref": "#/definitions/databases" + } + ], + "definitions": { + "databases": { "type": "object", "required": ["db"], "properties": { "db": { - "$ref": "https://mapcolonies.com/common/db/full/v2" + "allOf": [ + { + "$ref": "https://mapcolonies.com/common/db/full/v2" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "x-env-value": "DB_TYPE", + "default": "postgres" + } + }, + "required": ["type"] + } + ] } } } - ] + } } From bd09eb552555ad45e16ef9e343be9f70afe79122 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Sun, 5 Apr 2026 15:42:16 +0300 Subject: [PATCH 04/14] chore: add spacing From d600d3789fb2c33faf877d85f84fd1b08e23df87 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Tue, 28 Apr 2026 17:29:46 +0300 Subject: [PATCH 05/14] feat: add schemas for all packages --- .../vector/ivsApi/{ => api}/v1.schema.json | 2 +- schemas/vector/ivsApi/common/v1.schema.json | 37 +++++++++++++++++++ .../vector/ivsApi/synchronizer/v1.schema.json | 35 ++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) rename schemas/vector/ivsApi/{ => api}/v1.schema.json (95%) create mode 100644 schemas/vector/ivsApi/common/v1.schema.json create mode 100644 schemas/vector/ivsApi/synchronizer/v1.schema.json diff --git a/schemas/vector/ivsApi/v1.schema.json b/schemas/vector/ivsApi/api/v1.schema.json similarity index 95% rename from schemas/vector/ivsApi/v1.schema.json rename to schemas/vector/ivsApi/api/v1.schema.json index 46898da7..e5bbf6ab 100644 --- a/schemas/vector/ivsApi/v1.schema.json +++ b/schemas/vector/ivsApi/api/v1.schema.json @@ -1,7 +1,7 @@ { "$id": "https://mapcolonies.com/vector/ivsApi/v1", "type": "object", - "title": "vectorIvsApiSchemaV1", + "title": "vectorStandardApiSchemaV1", "description": "Vector's IVS API schema", "allOf": [ { diff --git a/schemas/vector/ivsApi/common/v1.schema.json b/schemas/vector/ivsApi/common/v1.schema.json new file mode 100644 index 00000000..1421ddf3 --- /dev/null +++ b/schemas/vector/ivsApi/common/v1.schema.json @@ -0,0 +1,37 @@ +{ + "$id": "https://mapcolonies.com/vector/ivsApi/v1", + "type": "object", + "title": "vectorStandardCommonSchemaV1", + "description": "Vector's IVS API schema", + "allOf": [ + { + "$ref": "#/definitions/databases" + } + ], + "definitions": { + "databases": { + "type": "object", + "required": ["db"], + "properties": { + "db": { + "allOf": [ + { + "$ref": "https://mapcolonies.com/common/db/full/v2" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "x-env-value": "DB_TYPE", + "default": "postgres" + } + }, + "required": ["type"] + } + ] + } + } + } + } +} diff --git a/schemas/vector/ivsApi/synchronizer/v1.schema.json b/schemas/vector/ivsApi/synchronizer/v1.schema.json new file mode 100644 index 00000000..5e45e0bb --- /dev/null +++ b/schemas/vector/ivsApi/synchronizer/v1.schema.json @@ -0,0 +1,35 @@ +{ + "$id": "https://mapcolonies.com/vector/ivsApi/v1", + "type": "object", + "title": "vectorStandardSynchronizerSchemaV1", + "description": "Vector's IVS API schema", + "allOf": [ + { "$ref": "https://mapcolonies.com/common/boilerplate/v2" }, + { + "type": "object", + "required": ["sourceDb", "destinationDb"], + "properties": { + "sourceDb": { "$ref": "#/definitions/database" }, + "destinationDb": { "$ref": "#/definitions/database" } + } + } + ], + "definitions": { + "database": { + "allOf": [ + { "$ref": "https://mapcolonies.com/common/db/full/v2" }, + { + "type": "object", + "required": ["type"], + "properties": { + "type": { + "type": "string", + "x-env-value": "DB_TYPE", + "default": "postgres" + } + } + } + ] + } + } +} From c0b53669f0205f676615f381846130d5356c161b Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Tue, 28 Apr 2026 17:32:49 +0300 Subject: [PATCH 06/14] fix: fix id in schemas --- schemas/vector/ivsApi/api/v1.schema.json | 2 +- schemas/vector/ivsApi/common/v1.schema.json | 2 +- schemas/vector/ivsApi/synchronizer/v1.schema.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/schemas/vector/ivsApi/api/v1.schema.json b/schemas/vector/ivsApi/api/v1.schema.json index e5bbf6ab..7efe1a64 100644 --- a/schemas/vector/ivsApi/api/v1.schema.json +++ b/schemas/vector/ivsApi/api/v1.schema.json @@ -1,5 +1,5 @@ { - "$id": "https://mapcolonies.com/vector/ivsApi/v1", + "$id": "https://mapcolonies.com/vector/ivsApi/api/v1", "type": "object", "title": "vectorStandardApiSchemaV1", "description": "Vector's IVS API schema", diff --git a/schemas/vector/ivsApi/common/v1.schema.json b/schemas/vector/ivsApi/common/v1.schema.json index 1421ddf3..619d1a0b 100644 --- a/schemas/vector/ivsApi/common/v1.schema.json +++ b/schemas/vector/ivsApi/common/v1.schema.json @@ -1,5 +1,5 @@ { - "$id": "https://mapcolonies.com/vector/ivsApi/v1", + "$id": "https://mapcolonies.com/vector/ivsApi/common/v1", "type": "object", "title": "vectorStandardCommonSchemaV1", "description": "Vector's IVS API schema", diff --git a/schemas/vector/ivsApi/synchronizer/v1.schema.json b/schemas/vector/ivsApi/synchronizer/v1.schema.json index 5e45e0bb..8cd6b028 100644 --- a/schemas/vector/ivsApi/synchronizer/v1.schema.json +++ b/schemas/vector/ivsApi/synchronizer/v1.schema.json @@ -1,5 +1,5 @@ { - "$id": "https://mapcolonies.com/vector/ivsApi/v1", + "$id": "https://mapcolonies.com/vector/ivsApi/synchronizer/v1", "type": "object", "title": "vectorStandardSynchronizerSchemaV1", "description": "Vector's IVS API schema", From 023048253dcf0700284c3cb3bb63bcc67ad7d657 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 30 Apr 2026 15:41:26 +0300 Subject: [PATCH 07/14] feat: add cron variable to synchronizer --- package-lock.json | 5 +++++ schemas/vector/ivsApi/synchronizer/v1.schema.json | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 2f03af23..4c16f619 100644 --- a/package-lock.json +++ b/package-lock.json @@ -905,6 +905,7 @@ "integrity": "sha512-ne4A0IpG3+2ETuREInjPNhUGis1SFjv1d5asp8MzEAGtOZeTeHVDOYqOgqfhvseqg/iXty2hjBf1zAOb7RNiNw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -915,6 +916,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -1155,6 +1157,7 @@ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -1880,6 +1883,7 @@ "integrity": "sha512-quyMrVt6svPS7CjQ9gKb3GLEX/rl3BCL2oa/QkNcXv4YNVBC9olt3s+H7ukto06q7B1Qz46PbrKLO34PR6vXcA==", "dev": true, "license": "MIT", + "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -2277,6 +2281,7 @@ "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/schemas/vector/ivsApi/synchronizer/v1.schema.json b/schemas/vector/ivsApi/synchronizer/v1.schema.json index 8cd6b028..2396b55d 100644 --- a/schemas/vector/ivsApi/synchronizer/v1.schema.json +++ b/schemas/vector/ivsApi/synchronizer/v1.schema.json @@ -12,7 +12,8 @@ "sourceDb": { "$ref": "#/definitions/database" }, "destinationDb": { "$ref": "#/definitions/database" } } - } + }, + { "$ref": "#/definitions/schedule" } ], "definitions": { "database": { @@ -30,6 +31,13 @@ } } ] + }, + "schedule": { + "type": "string", + "description": "The cron timing spec", + "default": "0 0 * * *", + "examples": ["*/1 * * * *"], + "x-env-value": "SYNC_FIELDS_CRON" } } } From 0e647c6a7c8aae4373741e15b1b29e7494b60074 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 30 Apr 2026 15:46:51 +0300 Subject: [PATCH 08/14] fix: make schedule work with right --- schemas/vector/ivsApi/synchronizer/v1.schema.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/schemas/vector/ivsApi/synchronizer/v1.schema.json b/schemas/vector/ivsApi/synchronizer/v1.schema.json index 2396b55d..0c676bae 100644 --- a/schemas/vector/ivsApi/synchronizer/v1.schema.json +++ b/schemas/vector/ivsApi/synchronizer/v1.schema.json @@ -10,10 +10,10 @@ "required": ["sourceDb", "destinationDb"], "properties": { "sourceDb": { "$ref": "#/definitions/database" }, - "destinationDb": { "$ref": "#/definitions/database" } + "destinationDb": { "$ref": "#/definitions/database" }, + "schedule": { "$ref": "#/definitions/schedule" } } - }, - { "$ref": "#/definitions/schedule" } + } ], "definitions": { "database": { From 358239f34e3a58b25bd38a0a69ec2b70d563d391 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Thu, 30 Apr 2026 15:50:27 +0300 Subject: [PATCH 09/14] fix: require schedule --- schemas/vector/ivsApi/synchronizer/v1.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/vector/ivsApi/synchronizer/v1.schema.json b/schemas/vector/ivsApi/synchronizer/v1.schema.json index 0c676bae..c14677e5 100644 --- a/schemas/vector/ivsApi/synchronizer/v1.schema.json +++ b/schemas/vector/ivsApi/synchronizer/v1.schema.json @@ -7,7 +7,7 @@ { "$ref": "https://mapcolonies.com/common/boilerplate/v2" }, { "type": "object", - "required": ["sourceDb", "destinationDb"], + "required": ["sourceDb", "destinationDb", "schedule"], "properties": { "sourceDb": { "$ref": "#/definitions/database" }, "destinationDb": { "$ref": "#/definitions/database" }, From ad9b75abdfa7f079321cad39406b398e26beba87 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Sun, 17 May 2026 11:05:10 +0300 Subject: [PATCH 10/14] feat: add index name format --- schemas/vector/ivsApi/synchronizer/v1.schema.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/schemas/vector/ivsApi/synchronizer/v1.schema.json b/schemas/vector/ivsApi/synchronizer/v1.schema.json index c14677e5..36b0b280 100644 --- a/schemas/vector/ivsApi/synchronizer/v1.schema.json +++ b/schemas/vector/ivsApi/synchronizer/v1.schema.json @@ -11,7 +11,8 @@ "properties": { "sourceDb": { "$ref": "#/definitions/database" }, "destinationDb": { "$ref": "#/definitions/database" }, - "schedule": { "$ref": "#/definitions/schedule" } + "schedule": { "$ref": "#/definitions/schedule" }, + "indexNameFormat": { "$ref": "#/definitions/indexNameFormat" } } } ], @@ -38,6 +39,13 @@ "default": "0 0 * * *", "examples": ["*/1 * * * *"], "x-env-value": "SYNC_FIELDS_CRON" + }, + "indexNameFormat": { + "type": "string", + "description": "The indexes' names in the source DB", + "default": "{layerName}_{column}_idx", + "examples": ["{layerName}_{column}_idx"], + "x-env-value": "SYNC_FIELDS_CRON" } } } From b561bc1ebb9dd3a990dc257288656a9742b3b34a Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Sun, 24 May 2026 11:50:48 +0300 Subject: [PATCH 11/14] feat: add actual env variables for both dest and source db --- .../vector/ivsApi/synchronizer/v1.schema.json | 76 +++++++++++++++---- 1 file changed, 62 insertions(+), 14 deletions(-) diff --git a/schemas/vector/ivsApi/synchronizer/v1.schema.json b/schemas/vector/ivsApi/synchronizer/v1.schema.json index 36b0b280..cd3d9614 100644 --- a/schemas/vector/ivsApi/synchronizer/v1.schema.json +++ b/schemas/vector/ivsApi/synchronizer/v1.schema.json @@ -9,29 +9,77 @@ "type": "object", "required": ["sourceDb", "destinationDb", "schedule"], "properties": { - "sourceDb": { "$ref": "#/definitions/database" }, - "destinationDb": { "$ref": "#/definitions/database" }, + "sourceDb": { "$ref": "#/definitions/sourceDatabase" }, + "destinationDb": { "$ref": "#/definitions/destinationDatabase" }, "schedule": { "$ref": "#/definitions/schedule" }, "indexNameFormat": { "$ref": "#/definitions/indexNameFormat" } } } ], "definitions": { - "database": { - "allOf": [ - { "$ref": "https://mapcolonies.com/common/db/full/v2" }, - { - "type": "object", - "required": ["type"], + "ssl": { + "type": "object", + "description": "ssl configuration", + "unevaluatedProperties": false, + "if": { "properties": { "enabled": { "const": true } } }, + "then": { "required": ["ca", "cert", "key"] }, + "else": { "properties": { "enabled": { "const": false } } } + }, + "sourceDatabase": { + "type": "object", + "required": ["database", "ssl", "type"], + "properties": { + "host": { "type": "string", "description": "the host of the database", "default": "localhost", "x-env-value": "SOURCE_DB_HOST" }, + "port": { "type": "integer", "description": "the port of the database", "default": 5432, "x-env-value": "SOURCE_DB_PORT" }, + "username": { + "type": "string", + "description": "the username of the database", + "default": "postgres", + "maxLength": 63, + "x-env-value": "SOURCE_DB_USERNAME" + }, + "password": { "type": "string", "description": "the password of the database", "default": "postgres", "x-env-value": "SOURCE_DB_PASSWORD" }, + "schema": { "type": "string", "description": "the schema name of the database", "default": "public", "x-env-value": "SOURCE_DB_SCHEMA" }, + "database": { "type": "string", "description": "the database name", "maxLength": 63, "x-env-value": "SOURCE_DB_NAME" }, + "type": { "type": "string", "description": "the type of the database", "default": "postgres", "x-env-value": "SOURCE_DB_TYPE" }, + "ssl": { + "allOf": [{ "$ref": "#/definitions/ssl" }], + "properties": { + "enabled": { "type": "boolean", "description": "enable ssl", "default": false, "x-env-value": "SOURCE_DB_ENABLE_SSL_AUTH" }, + "ca": { "type": "string", "description": "the path to the ca file", "x-env-value": "SOURCE_DB_CA_PATH" }, + "cert": { "type": "string", "description": "the path to the cert file", "x-env-value": "SOURCE_DB_CERT_PATH" }, + "key": { "type": "string", "description": "the path to the key file", "x-env-value": "SOURCE_DB_KEY_PATH" } + } + } + } + }, + "destinationDatabase": { + "type": "object", + "required": ["database", "ssl", "type"], + "properties": { + "host": { "type": "string", "description": "the host of the database", "default": "localhost", "x-env-value": "DEST_DB_HOST" }, + "port": { "type": "integer", "description": "the port of the database", "default": 5432, "x-env-value": "DEST_DB_PORT" }, + "username": { + "type": "string", + "description": "the username of the database", + "default": "postgres", + "maxLength": 63, + "x-env-value": "DEST_DB_USERNAME" + }, + "password": { "type": "string", "description": "the password of the database", "default": "postgres", "x-env-value": "DEST_DB_PASSWORD" }, + "schema": { "type": "string", "description": "the schema name of the database", "default": "public", "x-env-value": "DEST_DB_SCHEMA" }, + "database": { "type": "string", "description": "the database name", "maxLength": 63, "x-env-value": "DEST_DB_NAME" }, + "type": { "type": "string", "description": "the type of the database", "default": "postgres", "x-env-value": "DEST_DB_TYPE" }, + "ssl": { + "allOf": [{ "$ref": "#/definitions/ssl" }], "properties": { - "type": { - "type": "string", - "x-env-value": "DB_TYPE", - "default": "postgres" - } + "enabled": { "type": "boolean", "description": "enable ssl", "default": false, "x-env-value": "DEST_DB_ENABLE_SSL_AUTH" }, + "ca": { "type": "string", "description": "the path to the ca file", "x-env-value": "DEST_DB_CA_PATH" }, + "cert": { "type": "string", "description": "the path to the cert file", "x-env-value": "DEST_DB_CERT_PATH" }, + "key": { "type": "string", "description": "the path to the key file", "x-env-value": "DEST_DB_KEY_PATH" } } } - ] + } }, "schedule": { "type": "string", From 397bc093b76e4f4ad403edb5ce662c5c2868db13 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Sun, 24 May 2026 16:51:09 +0300 Subject: [PATCH 12/14] chore: change name to vector standard --- schemas/vector/{ivsApi => vectorStandard}/api/v1.schema.json | 4 ++-- .../vector/{ivsApi => vectorStandard}/common/v1.schema.json | 4 ++-- .../{ivsApi => vectorStandard}/synchronizer/v1.schema.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename schemas/vector/{ivsApi => vectorStandard}/api/v1.schema.json (87%) rename schemas/vector/{ivsApi => vectorStandard}/common/v1.schema.json (85%) rename schemas/vector/{ivsApi => vectorStandard}/synchronizer/v1.schema.json (97%) diff --git a/schemas/vector/ivsApi/api/v1.schema.json b/schemas/vector/vectorStandard/api/v1.schema.json similarity index 87% rename from schemas/vector/ivsApi/api/v1.schema.json rename to schemas/vector/vectorStandard/api/v1.schema.json index 7efe1a64..619039b9 100644 --- a/schemas/vector/ivsApi/api/v1.schema.json +++ b/schemas/vector/vectorStandard/api/v1.schema.json @@ -1,8 +1,8 @@ { - "$id": "https://mapcolonies.com/vector/ivsApi/api/v1", + "$id": "https://mapcolonies.com/vector/vectorStandard/api/v1", "type": "object", "title": "vectorStandardApiSchemaV1", - "description": "Vector's IVS API schema", + "description": "Vector's standard API schema", "allOf": [ { "$ref": "https://mapcolonies.com/common/boilerplate/v2" diff --git a/schemas/vector/ivsApi/common/v1.schema.json b/schemas/vector/vectorStandard/common/v1.schema.json similarity index 85% rename from schemas/vector/ivsApi/common/v1.schema.json rename to schemas/vector/vectorStandard/common/v1.schema.json index 619d1a0b..6c411493 100644 --- a/schemas/vector/ivsApi/common/v1.schema.json +++ b/schemas/vector/vectorStandard/common/v1.schema.json @@ -1,8 +1,8 @@ { - "$id": "https://mapcolonies.com/vector/ivsApi/common/v1", + "$id": "https://mapcolonies.com/vector/vectorStandard/common/v1", "type": "object", "title": "vectorStandardCommonSchemaV1", - "description": "Vector's IVS API schema", + "description": "Vector's standard common DB schema", "allOf": [ { "$ref": "#/definitions/databases" diff --git a/schemas/vector/ivsApi/synchronizer/v1.schema.json b/schemas/vector/vectorStandard/synchronizer/v1.schema.json similarity index 97% rename from schemas/vector/ivsApi/synchronizer/v1.schema.json rename to schemas/vector/vectorStandard/synchronizer/v1.schema.json index cd3d9614..2a184302 100644 --- a/schemas/vector/ivsApi/synchronizer/v1.schema.json +++ b/schemas/vector/vectorStandard/synchronizer/v1.schema.json @@ -1,8 +1,8 @@ { - "$id": "https://mapcolonies.com/vector/ivsApi/synchronizer/v1", + "$id": "https://mapcolonies.com/vector/vectorStandard/synchronizer/v1", "type": "object", "title": "vectorStandardSynchronizerSchemaV1", - "description": "Vector's IVS API schema", + "description": "Vector's standard synchronizer schema", "allOf": [ { "$ref": "https://mapcolonies.com/common/boilerplate/v2" }, { From 9330739e07f9f7210e3afb1cc3b1299efcc4f4f8 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Mon, 25 May 2026 16:07:51 +0300 Subject: [PATCH 13/14] fix: fix db config names --- schemas/vector/vectorStandard/synchronizer/v1.schema.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/schemas/vector/vectorStandard/synchronizer/v1.schema.json b/schemas/vector/vectorStandard/synchronizer/v1.schema.json index 2a184302..953a68f0 100644 --- a/schemas/vector/vectorStandard/synchronizer/v1.schema.json +++ b/schemas/vector/vectorStandard/synchronizer/v1.schema.json @@ -9,8 +9,8 @@ "type": "object", "required": ["sourceDb", "destinationDb", "schedule"], "properties": { - "sourceDb": { "$ref": "#/definitions/sourceDatabase" }, - "destinationDb": { "$ref": "#/definitions/destinationDatabase" }, + "sourceDb": { "$ref": "#/definitions/sourceDb" }, + "destinationDb": { "$ref": "#/definitions/destinationDb" }, "schedule": { "$ref": "#/definitions/schedule" }, "indexNameFormat": { "$ref": "#/definitions/indexNameFormat" } } @@ -25,7 +25,7 @@ "then": { "required": ["ca", "cert", "key"] }, "else": { "properties": { "enabled": { "const": false } } } }, - "sourceDatabase": { + "sourceDb": { "type": "object", "required": ["database", "ssl", "type"], "properties": { @@ -53,7 +53,7 @@ } } }, - "destinationDatabase": { + "destinationDb": { "type": "object", "required": ["database", "ssl", "type"], "properties": { From 8bda4537d1297a4f8c5a4c59d6155418fc2936d5 Mon Sep 17 00:00:00 2001 From: eyal rozen Date: Mon, 25 May 2026 16:22:30 +0300 Subject: [PATCH 14/14] fix: copy ssl correctly --- .../synchronizer/v1.schema.json | 92 +++++++++++++++++-- 1 file changed, 82 insertions(+), 10 deletions(-) diff --git a/schemas/vector/vectorStandard/synchronizer/v1.schema.json b/schemas/vector/vectorStandard/synchronizer/v1.schema.json index 953a68f0..2eabade4 100644 --- a/schemas/vector/vectorStandard/synchronizer/v1.schema.json +++ b/schemas/vector/vectorStandard/synchronizer/v1.schema.json @@ -43,12 +43,48 @@ "database": { "type": "string", "description": "the database name", "maxLength": 63, "x-env-value": "SOURCE_DB_NAME" }, "type": { "type": "string", "description": "the type of the database", "default": "postgres", "x-env-value": "SOURCE_DB_TYPE" }, "ssl": { - "allOf": [{ "$ref": "#/definitions/ssl" }], + "type": "object", + "description": "ssl configuration", "properties": { - "enabled": { "type": "boolean", "description": "enable ssl", "default": false, "x-env-value": "SOURCE_DB_ENABLE_SSL_AUTH" }, - "ca": { "type": "string", "description": "the path to the ca file", "x-env-value": "SOURCE_DB_CA_PATH" }, - "cert": { "type": "string", "description": "the path to the cert file", "x-env-value": "SOURCE_DB_CERT_PATH" }, - "key": { "type": "string", "description": "the path to the key file", "x-env-value": "SOURCE_DB_KEY_PATH" } + "enabled": { + "type": "boolean", + "description": "enable ssl", + "default": false, + "x-env-value": "SOURCE_DB_ENABLE_SSL_AUTH" + }, + "ca": { + "type": "string", + "description": "the path to the ca file", + "x-env-value": "SOURCE_DB_CA_PATH" + }, + "cert": { + "type": "string", + "description": "the path to the cert file", + "x-env-value": "SOURCE_DB_CERT_PATH" + }, + "key": { + "type": "string", + "description": "the path to the key file", + "x-env-value": "SOURCE_DB_KEY_PATH" + } + }, + "unevaluatedProperties": false, + "if": { + "properties": { + "enabled": { + "const": true + } + } + }, + "then": { + "required": ["ca", "cert", "key"] + }, + "else": { + "properties": { + "enabled": { + "const": false + } + } } } } @@ -71,12 +107,48 @@ "database": { "type": "string", "description": "the database name", "maxLength": 63, "x-env-value": "DEST_DB_NAME" }, "type": { "type": "string", "description": "the type of the database", "default": "postgres", "x-env-value": "DEST_DB_TYPE" }, "ssl": { - "allOf": [{ "$ref": "#/definitions/ssl" }], + "type": "object", + "description": "ssl configuration", "properties": { - "enabled": { "type": "boolean", "description": "enable ssl", "default": false, "x-env-value": "DEST_DB_ENABLE_SSL_AUTH" }, - "ca": { "type": "string", "description": "the path to the ca file", "x-env-value": "DEST_DB_CA_PATH" }, - "cert": { "type": "string", "description": "the path to the cert file", "x-env-value": "DEST_DB_CERT_PATH" }, - "key": { "type": "string", "description": "the path to the key file", "x-env-value": "DEST_DB_KEY_PATH" } + "enabled": { + "type": "boolean", + "description": "enable ssl", + "default": false, + "x-env-value": "DEST_DB_ENABLE_SSL_AUTH" + }, + "ca": { + "type": "string", + "description": "the path to the ca file", + "x-env-value": "DEST_DB_CA_PATH" + }, + "cert": { + "type": "string", + "description": "the path to the cert file", + "x-env-value": "DEST_DB_CERT_PATH" + }, + "key": { + "type": "string", + "description": "the path to the key file", + "x-env-value": "DEST_DB_KEY_PATH" + } + }, + "unevaluatedProperties": false, + "if": { + "properties": { + "enabled": { + "const": true + } + } + }, + "then": { + "required": ["ca", "cert", "key"] + }, + "else": { + "properties": { + "enabled": { + "const": false + } + } } } }