From aa96356a29f8832f6381efa3ee070b6041f1daf5 Mon Sep 17 00:00:00 2001 From: Gary O'Neall Date: Sun, 2 Nov 2025 20:41:23 -0800 Subject: [PATCH] Remove detailed SPDX V3 schema messages The schema verification messages are very detailed and not very helpful. Replaced with a single message that it doesn't validate against the schema. Signed-off-by: Gary O'Neall --- src/main/java/org/spdx/tools/Verify.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/spdx/tools/Verify.java b/src/main/java/org/spdx/tools/Verify.java index 10a91ca..cff5dce 100644 --- a/src/main/java/org/spdx/tools/Verify.java +++ b/src/main/java/org/spdx/tools/Verify.java @@ -182,8 +182,12 @@ public static List verify(String filePath, SerFileType fileType) throws root = JSON_MAPPER.readTree(is); } Set messages = schema.validate(root); - for (ValidationMessage msg:messages) { - retval.add(msg.toString()); +// for (ValidationMessage msg:messages) { +// retval.add(msg.toString()); +// } + // TODO: Improve validation messages - currently, not very useful + if (!messages.isEmpty()) { + retval.add("JSON Schema did not pass validation"); } } catch (IOException e) { retval.add("Unable to validate JSON file against schema due to I/O Error");