Skip to content

Conversation

vibe13
Copy link

@vibe13 vibe13 commented Jan 28, 2025

Following #565, this PR attempts to add the missing mapping to comply with the CycloneDX 1.6 spec for the "provides" field inside the Dependency object: https://cyclonedx.org/docs/1.6/json/#dependencies_items_provides.

@vibe13 vibe13 requested a review from a team as a code owner January 28, 2025 13:56
@vibe13 vibe13 force-pushed the add_provides_mapping branch from c05258b to d42bf3b Compare January 28, 2025 13:57
@vibe13 vibe13 force-pushed the add_provides_mapping branch from d42bf3b to 62a4ffc Compare February 11, 2025 10:47
}
}

@VersionFilter(Version.VERSION_16)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version filter is only needed at the attribute level

@VersionFilter(Version.VERSION_16)
@JsonProperty("provides")
@JacksonXmlProperty(localName = "provides")
private List<Dependency> provides;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be private List<BomReference> provides the provide is linked to a BomRef not to a dependency based on the spec

generator.writeString(subDependency.getRef());
}
}
generator.writeEndArray();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests for both Generators and Parses should be included (for XML and JSON)

}
}
generator.writeEndArray();
if (CollectionUtils.isNotEmpty(dependency.getProvides())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this works, better to check with the generator test to confirm

@vibe13 vibe13 force-pushed the add_provides_mapping branch from a358c91 to 4e13d3a Compare March 29, 2025 13:33
@vibe13
Copy link
Author

vibe13 commented Mar 29, 2025

@mr-zepol Hi, apologies for the very late reply, pushed some fixes after your review, thanks!

@vibe13
Copy link
Author

vibe13 commented May 12, 2025

@mr-zepol Hi! Is there anything else I can do here? Would it be possible to have another review? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants