From 12ed45de51d288e84c63804998c6532b0a24b920 Mon Sep 17 00:00:00 2001 From: Daniel Segovia Date: Thu, 6 Nov 2025 05:55:31 -0800 Subject: [PATCH 1/2] fix freebusy serializer --- google/calendar/src/types.rs | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/google/calendar/src/types.rs b/google/calendar/src/types.rs index b5912c5b..651368e3 100644 --- a/google/calendar/src/types.rs +++ b/google/calendar/src/types.rs @@ -1,4 +1,6 @@ //! The data types sent to and returned from the API client. +use std::collections::HashMap; + use schemars::JsonSchema; use serde::{Deserialize, Serialize}; @@ -1904,8 +1906,7 @@ pub struct FreeBusyResponse { /** * List of free/busy information for calendars. */ - #[serde(default, skip_serializing_if = "Option::is_none")] - pub calendars: Option, + pub calendars: HashMap, /** * Expansion of groups. */ @@ -2040,23 +2041,11 @@ pub struct TimePeriod { /** * Last modification time of the color palette (as a RFC3339 timestamp). Read-only. */ - #[serde( - default, - skip_serializing_if = "Option::is_none", - deserialize_with = "crate::utils::date_time_format::deserialize", - serialize_with = "crate::utils::google_calendar_date_time_format::serialize" - )] - pub end: Option>, + pub end: chrono::DateTime, /** * Last modification time of the color palette (as a RFC3339 timestamp). Read-only. */ - #[serde( - default, - skip_serializing_if = "Option::is_none", - deserialize_with = "crate::utils::date_time_format::deserialize", - serialize_with = "crate::utils::google_calendar_date_time_format::serialize" - )] - pub start: Option>, + pub start: chrono::DateTime, } /** From abadfb36b2cdae506a3c29f972fcc2d59898aa28 Mon Sep 17 00:00:00 2001 From: Daniel Segovia Date: Thu, 6 Nov 2025 06:03:49 -0800 Subject: [PATCH 2/2] order imports --- google/calendar/src/types.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/google/calendar/src/types.rs b/google/calendar/src/types.rs index 651368e3..c01fef48 100644 --- a/google/calendar/src/types.rs +++ b/google/calendar/src/types.rs @@ -1,8 +1,7 @@ //! The data types sent to and returned from the API client. -use std::collections::HashMap; - use schemars::JsonSchema; use serde::{Deserialize, Serialize}; +use std::collections::HashMap; #[derive(Serialize, Deserialize, PartialEq, Debug, Clone, JsonSchema)] pub struct Acl {