From c9a783aec56b680ac1099f623f7fb88cbc039ed0 Mon Sep 17 00:00:00 2001 From: joe-prosser Date: Tue, 8 Oct 2024 17:17:49 +0100 Subject: [PATCH] fix(api): serde default when missing for property filter (#321) --- CHANGELOG.md | 2 ++ api/src/resources/comment.rs | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 196ac82..592d0be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ - Round trip `field_id` - Add `ixp` dataset flag - rename label def description to instructions +- Default value for PropertyValue + # v0.33.1 - Fix selection index issue on custom label trend reports diff --git a/api/src/resources/comment.rs b/api/src/resources/comment.rs index bff871a..bff3be8 100644 --- a/api/src/resources/comment.rs +++ b/api/src/resources/comment.rs @@ -72,11 +72,11 @@ pub struct UserPropertiesFilter(pub HashMap); #[derive(Default, Debug, Clone, Serialize, Deserialize)] pub struct PropertyFilter { - #[serde(skip_serializing_if = "<[_]>::is_empty")] + #[serde(skip_serializing_if = "<[_]>::is_empty", default)] pub one_of: Vec, - #[serde(skip_serializing_if = "<[_]>::is_empty")] + #[serde(skip_serializing_if = "<[_]>::is_empty", default)] pub not_one_of: Vec, - #[serde(skip_serializing_if = "<[_]>::is_empty")] + #[serde(skip_serializing_if = "<[_]>::is_empty", default)] pub domain_not_one_of: Vec, #[serde(skip_serializing_if = "Option::is_none")] pub minimum: Option>,