Skip to content

Commit 3e9dbab

Browse files
committed
Use response instead of responses when serializing VulnerabilityAnalysis
Signed-off-by: Naxdy <naxdy@naxdy.org>
1 parent d5c35fd commit 3e9dbab

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub(crate) mod base {
4444
#[serde(skip_serializing_if = "Option::is_none")]
4545
justification: Option<ImpactAnalysisJustification>,
4646
#[serde(skip_serializing_if = "Option::is_none")]
47-
responses: Option<Vec<ImpactAnalysisResponse>>,
47+
response: Option<Vec<ImpactAnalysisResponse>>,
4848
#[serde(skip_serializing_if = "Option::is_none")]
4949
detail: Option<String>,
5050
#[versioned("1.5")]
@@ -60,7 +60,7 @@ pub(crate) mod base {
6060
Self {
6161
state: convert_optional(other.state),
6262
justification: convert_optional(other.justification),
63-
responses: convert_optional_vec(other.responses),
63+
response: convert_optional_vec(other.responses),
6464
detail: other.detail,
6565
#[versioned("1.5")]
6666
first_issued: other.first_issued.map(|d| d.to_string()),
@@ -75,7 +75,7 @@ pub(crate) mod base {
7575
Self {
7676
state: convert_optional(other.state),
7777
justification: convert_optional(other.justification),
78-
responses: convert_optional_vec(other.responses),
78+
responses: convert_optional_vec(other.response),
7979
detail: other.detail,
8080
#[versioned("1.4")]
8181
first_issued: None,
@@ -115,7 +115,7 @@ pub(crate) mod base {
115115
write_simple_tag(writer, JUSTIFICATION_TAG, &justification.0)?;
116116
}
117117

118-
if let Some(responses) = &self.responses {
118+
if let Some(responses) = &self.response {
119119
write_start_tag(writer, RESPONSES_TAG)?;
120120

121121
for response in responses {
@@ -227,7 +227,7 @@ pub(crate) mod base {
227227
Ok(Self {
228228
state,
229229
justification,
230-
responses,
230+
response: responses,
231231
detail,
232232
#[versioned("1.5")]
233233
first_issued,
@@ -302,7 +302,7 @@ pub(crate) mod base {
302302
justification: Some(ImpactAnalysisJustification(
303303
"code_not_reachable".to_string(),
304304
)),
305-
responses: Some(vec![ImpactAnalysisResponse("update".to_string())]),
305+
response: Some(vec![ImpactAnalysisResponse("update".to_string())]),
306306
detail: Some("detail".to_string()),
307307
}
308308
}
@@ -314,7 +314,7 @@ pub(crate) mod base {
314314
justification: Some(ImpactAnalysisJustification(
315315
"code_not_reachable".to_string(),
316316
)),
317-
responses: Some(vec![ImpactAnalysisResponse("update".to_string())]),
317+
response: Some(vec![ImpactAnalysisResponse("update".to_string())]),
318318
detail: Some("detail".to_string()),
319319
first_issued: Some("2024-01-02".to_string()),
320320
last_updated: Some("2024-01-10".to_string()),

0 commit comments

Comments
 (0)