From 47bd195bc188ecc2dfed724af8f1b4a191e715d7 Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Mon, 25 Nov 2024 15:00:53 -0800 Subject: [PATCH 1/2] Make UniversalFlagConfigWire.format optional --- eppo_core/src/ufc/models.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eppo_core/src/ufc/models.rs b/eppo_core/src/ufc/models.rs index 2a024a94..fa865b15 100644 --- a/eppo_core/src/ufc/models.rs +++ b/eppo_core/src/ufc/models.rs @@ -18,7 +18,8 @@ pub type Timestamp = chrono::DateTime; pub(crate) struct UniversalFlagConfigWire { /// When configuration was last updated. pub created_at: Timestamp, - pub format: AssignmentFormat, + #[serde(default)] + pub format: Option, /// Environment this configuration belongs to. pub environment: Environment, /// Flags configuration. From 386cb41eae29c983c3f457f3249ed818469e93ee Mon Sep 17 00:00:00 2001 From: Leo Romanovsky Date: Wed, 27 Nov 2024 00:04:32 -0800 Subject: [PATCH 2/2] Update eppo_core/src/ufc/models.rs Co-authored-by: Oleksii Shmalko --- eppo_core/src/ufc/models.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eppo_core/src/ufc/models.rs b/eppo_core/src/ufc/models.rs index fa865b15..a0fbfd8e 100644 --- a/eppo_core/src/ufc/models.rs +++ b/eppo_core/src/ufc/models.rs @@ -18,7 +18,7 @@ pub type Timestamp = chrono::DateTime; pub(crate) struct UniversalFlagConfigWire { /// When configuration was last updated. pub created_at: Timestamp, - #[serde(default)] + #[serde(default, skip_serializing_if = "Option::is_none")] pub format: Option, /// Environment this configuration belongs to. pub environment: Environment,