Skip to content

Commit 7ee2f71

Browse files
committed
Patch: don't serialize diff if it's None
DependencyTrack complains if the diff is null. Signed-off-by: Graham Christensen <graham@grahamc.com>
1 parent ca72ec9 commit 7ee2f71

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • cyclonedx-bom/src/specs/common

cyclonedx-bom/src/specs/common/code.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ impl FromXml for Patches {
399399
pub(crate) struct Patch {
400400
#[serde(rename = "type")]
401401
patch_type: String,
402+
#[serde(skip_serializing_if = "Option::is_none")]
402403
diff: Option<Diff>,
403404
#[serde(skip_serializing_if = "Option::is_none")]
404405
resolves: Option<Vec<Issue>>,

0 commit comments

Comments
 (0)