From e8ce3c02eb0913fd60a4a2f38234c7cd72145f27 Mon Sep 17 00:00:00 2001 From: Francisco Tuduri Date: Fri, 28 Jul 2023 15:51:09 -0300 Subject: [PATCH] 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"] + } + ] }