Skip to content

Commit cd6cb62

Browse files
camelcase in homi api response
1 parent dc4ba4a commit cd6cb62

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/alerts/alert_structs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,21 +403,23 @@ impl AlertConfig {
403403
}
404404

405405
#[derive(Debug, Serialize)]
406+
#[serde(rename_all = "camelCase")]
406407
pub struct AlertsSummary {
407408
pub total: u64,
408409
pub triggered: AlertsInfoByState,
409410
pub disabled: AlertsInfoByState,
410-
#[serde(rename = "not-triggered")]
411411
pub not_triggered: AlertsInfoByState,
412412
}
413413

414414
#[derive(Debug, Serialize)]
415+
#[serde(rename_all = "camelCase")]
415416
pub struct AlertsInfoByState {
416417
pub total: u64,
417418
pub alert_info: Vec<AlertsInfo>,
418419
}
419420

420421
#[derive(Debug, Serialize)]
422+
#[serde(rename_all = "camelCase")]
421423
pub struct AlertsInfo {
422424
pub title: String,
423425
pub id: Ulid,

src/prism/home/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ pub struct DatedStats {
5959
}
6060

6161
#[derive(Debug, Serialize)]
62+
#[serde(rename_all = "camelCase")]
6263
pub struct DataSet {
6364
title: String,
6465
dataset_type: TelemetryType,
@@ -67,6 +68,7 @@ pub struct DataSet {
6768
}
6869

6970
#[derive(Debug, Serialize)]
71+
#[serde(rename_all = "camelCase")]
7072
pub struct HomeResponse {
7173
pub alerts_summary: AlertsSummary,
7274
pub stats_details: Vec<DatedStats>,

0 commit comments

Comments
 (0)