Skip to content

Commit 622cb43

Browse files
Delta456bonigarcia
andauthored
[rust] Fix Edge updates API deserialization (#14851)
* [selenium manager]: fix edge artifact deserialisation * add alias attr to all edge structs * add newline --------- Co-authored-by: Boni García <[email protected]>
1 parent 6442f61 commit 622cb43

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

rust/src/edge.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -555,42 +555,42 @@ impl SeleniumManager for EdgeManager {
555555

556556
#[derive(Serialize, Deserialize, Debug)]
557557
pub struct EdgeProduct {
558-
#[serde(rename = "Product")]
558+
#[serde(rename = "Product", alias = "product")]
559559
pub product: String,
560-
#[serde(rename = "Releases")]
560+
#[serde(rename = "Releases", alias = "releases")]
561561
pub releases: Vec<Release>,
562562
}
563563

564564
#[derive(Serialize, Deserialize, Debug)]
565565
pub struct Release {
566-
#[serde(rename = "ReleaseId")]
566+
#[serde(rename = "ReleaseId", alias = "releaseId")]
567567
pub release_id: u32,
568-
#[serde(rename = "Platform")]
568+
#[serde(rename = "Platform", alias = "platform")]
569569
pub platform: String,
570-
#[serde(rename = "Architecture")]
570+
#[serde(rename = "Architecture", alias = "architecture")]
571571
pub architecture: String,
572-
#[serde(rename = "CVEs")]
572+
#[serde(rename = "CVEs", alias = "cves")]
573573
pub cves: Vec<String>,
574-
#[serde(rename = "ProductVersion")]
574+
#[serde(rename = "ProductVersion", alias = "productVersion")]
575575
pub product_version: String,
576-
#[serde(rename = "Artifacts")]
576+
#[serde(rename = "Artifacts", alias = "artifacts")]
577577
pub artifacts: Vec<Artifact>,
578-
#[serde(rename = "PublishedTime")]
578+
#[serde(rename = "PublishedTime", alias = "publishedTime")]
579579
pub published_time: String,
580-
#[serde(rename = "ExpectedExpiryDate")]
580+
#[serde(rename = "ExpectedExpiryDate", alias = "expectedExpiryDate")]
581581
pub expected_expiry_date: String,
582582
}
583583

584584
#[derive(Serialize, Deserialize, Debug)]
585585
pub struct Artifact {
586-
#[serde(rename = "ArtifactName")]
586+
#[serde(rename = "ArtifactName", alias = "artifactName")]
587587
pub artifact_name: String,
588-
#[serde(rename = "Location")]
588+
#[serde(rename = "Location", alias = "location")]
589589
pub location: String,
590-
#[serde(rename = "Hash")]
590+
#[serde(rename = "Hash", alias = "hash")]
591591
pub hash: String,
592-
#[serde(rename = "HashAlgorithm")]
592+
#[serde(rename = "HashAlgorithm", alias = "hashAlgorithm")]
593593
pub hash_algorithm: String,
594-
#[serde(rename = "SizeInBytes")]
594+
#[serde(rename = "SizeInBytes", alias = "sizeInBytes")]
595595
pub size_in_bytes: u32,
596596
}

0 commit comments

Comments
 (0)