Enhancement: Summarize "duplicate components" schema error
#37 ouverte le 8 juin 2023
Métriques du dépôt
- Stars
- (155 étoiles)
- Métriques de merge PR
- (Métriques PR en attente)
Description
Extracted this feature request from issue https://github.com/CycloneDX/sbom-utility/issues/35
I ran this on an SBOM with 9928 components. There were duplicate components.
1. Type: [unique], Field: [components], Description: [array items[3,243] must be unique]
Failing object: [[
{
"name": "acl",
"publisher": "Guillem Jover <guillem@ ... (truncated)
The message is correct, components[3] and components[243] were duplicates. However, the "failing object" is truncated to show components[0]. But it wasn't related to the message. It would be much easier to read the message if the message showed components[3] instead of components[0].
Look to create special "handlers" for common error types starting with "duplicates". For example, the handler could actually identify and extract the "duplicate" object (the first one) and then better format the error message to show the entire json object.