feat: Add missing provides mapping to Dependency to comply with CycloneDX 1.6 spec#599
Open
vibe13 wants to merge 2 commits intoCycloneDX:masterfrom
Open
feat: Add missing provides mapping to Dependency to comply with CycloneDX 1.6 spec#599vibe13 wants to merge 2 commits intoCycloneDX:masterfrom
vibe13 wants to merge 2 commits intoCycloneDX:masterfrom
Conversation
c05258b to
d42bf3b
Compare
d42bf3b to
62a4ffc
Compare
mr-zepol
reviewed
Feb 27, 2025
| } | ||
| } | ||
|
|
||
| @VersionFilter(Version.VERSION_16) |
Contributor
There was a problem hiding this comment.
Version filter is only needed at the attribute level
mr-zepol
reviewed
Feb 27, 2025
| @VersionFilter(Version.VERSION_16) | ||
| @JsonProperty("provides") | ||
| @JacksonXmlProperty(localName = "provides") | ||
| private List<Dependency> provides; |
Contributor
There was a problem hiding this comment.
It should be private List<BomReference> provides the provide is linked to a BomRef not to a dependency based on the spec
mr-zepol
reviewed
Feb 27, 2025
| @@ -97,6 +97,13 @@ private void writeJSONDependenciesWithGenerator(final JsonGenerator generator, f | |||
| } | |||
| } | |||
| generator.writeEndArray(); | |||
Contributor
There was a problem hiding this comment.
Tests for both Generators and Parses should be included (for XML and JSON)
mr-zepol
reviewed
Feb 27, 2025
| } | ||
| } | ||
| generator.writeEndArray(); | ||
| if (CollectionUtils.isNotEmpty(dependency.getProvides())) { |
Contributor
There was a problem hiding this comment.
Not sure if this works, better to check with the generator test to confirm
…neDX 1.6 spec Signed-off-by: Andrea Vibelli <avibelli@redhat.com>
Signed-off-by: Andrea Vibelli <avibelli@redhat.com>
a358c91 to
4e13d3a
Compare
Author
|
@mr-zepol Hi, apologies for the very late reply, pushed some fixes after your review, thanks! |
Open
1 task
Author
|
@mr-zepol Hi! Is there anything else I can do here? Would it be possible to have another review? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.