fix: mark to skip serialization of Option when None

mark with `skip_serializing_if = "Option::is_none"`
This commit is contained in:
Gwen Lg
2026-02-04 18:30:25 +01:00
committed by Alex
parent d80096de92
commit 1ae4e5d438
4 changed files with 73 additions and 50 deletions
+2 -2
View File
@@ -94,9 +94,9 @@ pub struct CorsConfiguration {
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
pub struct CorsRule {
#[serde(rename = "ID")]
#[serde(rename = "ID", skip_serializing_if = "Option::is_none")]
pub id: Option<Value>,
#[serde(rename = "MaxAgeSeconds")]
#[serde(rename = "MaxAgeSeconds", skip_serializing_if = "Option::is_none")]
pub max_age_seconds: Option<IntValue>,
#[serde(rename = "AllowedOrigin")]
pub allowed_origins: Vec<Value>,