Skip to content

Commit b44028b

Browse files
committed
fix(libredirectionio): fix bad serialization on trace
1 parent 62a5183 commit b44028b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/router/request_matcher/datetime.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ pub struct DateTimeMatcher<T> {
2020
}
2121

2222
#[derive(Serialize, Deserialize, Debug, Clone, Hash, Eq, PartialEq, Ord, PartialOrd)]
23+
#[serde(rename_all = "snake_case")]
24+
#[serde(tag = "type", content = "date_time_type")]
2325
pub enum DateTimeCondition {
2426
DateTimeRange(Vec<RouteDateTime>),
2527
TimeRange(Vec<RouteTime>),

src/router/request_matcher/header.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ pub struct HeaderMatcher<T> {
1919
}
2020

2121
#[derive(Serialize, Deserialize, Debug, Clone, Hash, Eq, PartialEq, Ord, PartialOrd)]
22+
#[serde(rename_all = "snake_case")]
23+
#[serde(tag = "type", content = "value")]
2224
pub enum ValueCondition {
2325
IsDefined,
2426
IsNotDefined,

0 commit comments

Comments
 (0)