From e8ce3c02eb0913fd60a4a2f38234c7cd72145f27 Mon Sep 17 00:00:00 2001 From: Francisco Tuduri Date: Fri, 28 Jul 2023 15:51:09 -0300 Subject: [PATCH 1/2] fix: Update delta file schema. - 'data_blob' is no longer a required field on 'delete' operations. --- .../tools/migration_tool/delta_schema.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/deps/wazuh_testing/wazuh_testing/tools/migration_tool/delta_schema.json b/deps/wazuh_testing/wazuh_testing/tools/migration_tool/delta_schema.json index 1921c1e697..d78cfac870 100644 --- a/deps/wazuh_testing/wazuh_testing/tools/migration_tool/delta_schema.json +++ b/deps/wazuh_testing/wazuh_testing/tools/migration_tool/delta_schema.json @@ -22,5 +22,22 @@ "enum": ["insert", "update", "delete"] } }, - "required": [ "cve_id", "data_blob", "data_hash", "operation"] + "anyOf": [ + { + "properties": { + "operation": { + "enum": ["insert", "update"] + } + }, + "required": ["cve_id", "data_hash", "operation", "data_blob"] + }, + { + "properties": { + "operation": { + "const": "delete" + } + }, + "required": ["cve_id", "data_hash", "operation"] + } + ] } From d5755ef2df38dfce6c2322468648ff4ccab05db7 Mon Sep 17 00:00:00 2001 From: Damian Mangold Date: Thu, 3 Aug 2023 10:18:20 -0300 Subject: [PATCH 2/2] docs: updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d673ae5857..30961c804b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Release report: TBD ### Changed - Update _wazuh_db_ schema database version ([#4353](https://github.com/wazuh/wazuh-qa/pull/4353)) \- (Tests) +- Update the JSON schema with the required fields for the output content of the migration tool ([#4375](https://github.com/wazuh/wazuh-qa/pull/4375)) \- (Tests) ## [4.7.0] - TBD