From 7923752513e825162f8949125bd93fe402c138b0 Mon Sep 17 00:00:00 2001 From: qdequele Date: Fri, 29 Nov 2019 15:05:54 +0100 Subject: [PATCH 1/2] Serialize updates results to camelCase --- meilisearch-core/src/update/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meilisearch-core/src/update/mod.rs b/meilisearch-core/src/update/mod.rs index dee681cdf..0bcd573f6 100644 --- a/meilisearch-core/src/update/mod.rs +++ b/meilisearch-core/src/update/mod.rs @@ -172,6 +172,7 @@ pub enum UpdateType { } #[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] pub struct ProcessedUpdateResult { pub update_id: u64, #[serde(rename = "type")] @@ -184,6 +185,7 @@ pub struct ProcessedUpdateResult { } #[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] pub struct EnqueuedUpdateResult { pub update_id: u64, pub update_type: UpdateType, From 773a51e7d0991165bd6f281c9973c3d9c29f5152 Mon Sep 17 00:00:00 2001 From: qdequele Date: Fri, 29 Nov 2019 15:09:48 +0100 Subject: [PATCH 2/2] Rename 'update_type' to 'type' on EnqueuedUpdateResult --- meilisearch-core/src/update/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/meilisearch-core/src/update/mod.rs b/meilisearch-core/src/update/mod.rs index 0bcd573f6..cc6f369d2 100644 --- a/meilisearch-core/src/update/mod.rs +++ b/meilisearch-core/src/update/mod.rs @@ -188,6 +188,7 @@ pub struct ProcessedUpdateResult { #[serde(rename_all = "camelCase")] pub struct EnqueuedUpdateResult { pub update_id: u64, + #[serde(rename = "type")] pub update_type: UpdateType, pub enqueued_at: DateTime, }