From 20e337247a6fbf98dc3412fe90e67d105cb66fb7 Mon Sep 17 00:00:00 2001 From: delta456 Date: Fri, 6 Dec 2024 00:00:27 +0530 Subject: [PATCH 1/3] [selenium manager]: fix edge artifact deserialisation --- rust/src/edge.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rust/src/edge.rs b/rust/src/edge.rs index 582a7f1717b38..44516564b30b8 100644 --- a/rust/src/edge.rs +++ b/rust/src/edge.rs @@ -583,14 +583,14 @@ pub struct Release { #[derive(Serialize, Deserialize, Debug)] pub struct Artifact { - #[serde(rename = "ArtifactName")] + #[serde(rename = "artifactName")] pub artifact_name: String, - #[serde(rename = "Location")] + #[serde(rename = "location")] pub location: String, - #[serde(rename = "Hash")] + #[serde(rename = "hash")] pub hash: String, - #[serde(rename = "HashAlgorithm")] + #[serde(rename = "hashAlgorithm")] pub hash_algorithm: String, - #[serde(rename = "SizeInBytes")] + #[serde(rename = "sizeInBytes")] pub size_in_bytes: u32, } From 6d6381a505efb194c0c85aadcf9edf01ec90edc5 Mon Sep 17 00:00:00 2001 From: delta456 Date: Wed, 11 Dec 2024 23:35:55 +0530 Subject: [PATCH 2/3] add alias attr to all edge structs --- rust/src/edge.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/rust/src/edge.rs b/rust/src/edge.rs index 44516564b30b8..bd519434af020 100644 --- a/rust/src/edge.rs +++ b/rust/src/edge.rs @@ -555,42 +555,42 @@ impl SeleniumManager for EdgeManager { #[derive(Serialize, Deserialize, Debug)] pub struct EdgeProduct { - #[serde(rename = "Product")] + #[serde(rename = "Product", alias = "product")] pub product: String, - #[serde(rename = "Releases")] + #[serde(rename = "Releases", alias = "releases")] pub releases: Vec, } #[derive(Serialize, Deserialize, Debug)] pub struct Release { - #[serde(rename = "ReleaseId")] + #[serde(rename = "ReleaseId", alias = "releaseId")] pub release_id: u32, - #[serde(rename = "Platform")] + #[serde(rename = "Platform", alias = "platform")] pub platform: String, - #[serde(rename = "Architecture")] + #[serde(rename = "Architecture", alias = "architecture")] pub architecture: String, - #[serde(rename = "CVEs")] + #[serde(rename = "CVEs", alias = "cves")] pub cves: Vec, - #[serde(rename = "ProductVersion")] + #[serde(rename = "ProductVersion", alias = "productVersion")] pub product_version: String, - #[serde(rename = "Artifacts")] + #[serde(rename = "Artifacts", alias = "artifacts")] pub artifacts: Vec, - #[serde(rename = "PublishedTime")] + #[serde(rename = "PublishedTime", alias = "publishedTime")] pub published_time: String, - #[serde(rename = "ExpectedExpiryDate")] + #[serde(rename = "ExpectedExpiryDate", alias = "expectedExpiryDate")] pub expected_expiry_date: String, } #[derive(Serialize, Deserialize, Debug)] pub struct Artifact { - #[serde(rename = "artifactName")] + #[serde(rename = "ArtifactName", alias = "artifactName")] pub artifact_name: String, - #[serde(rename = "location")] + #[serde(rename = "Location", alias = "location")] pub location: String, - #[serde(rename = "hash")] + #[serde(rename = "Hash", alias = "hash")] pub hash: String, - #[serde(rename = "hashAlgorithm")] + #[serde(rename = "HashAlgorithm", alias = "hashAlgorithm")] pub hash_algorithm: String, - #[serde(rename = "sizeInBytes")] + #[serde(rename = "SizeInBytes", alias = "sizeInBytes")] pub size_in_bytes: u32, -} +} \ No newline at end of file From 1f4fa3aa69762e6e926f217e8af41639eb29e69b Mon Sep 17 00:00:00 2001 From: delta456 Date: Wed, 11 Dec 2024 23:36:53 +0530 Subject: [PATCH 3/3] add newline --- rust/src/edge.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/src/edge.rs b/rust/src/edge.rs index bd519434af020..8b844dd718630 100644 --- a/rust/src/edge.rs +++ b/rust/src/edge.rs @@ -593,4 +593,4 @@ pub struct Artifact { pub hash_algorithm: String, #[serde(rename = "SizeInBytes", alias = "sizeInBytes")] pub size_in_bytes: u32, -} \ No newline at end of file +}