Skip to content

Commit 5e26705

Browse files
committed
Force a default value for project_domains
1 parent 76548e5 commit 5e26705

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/api/explain_request.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub struct ExplainRequestInput {
1919
pub example: Example,
2020
pub rules: Vec<Rule>,
2121
pub max_hops: u8,
22+
#[serde(default)]
2223
pub project_domains: Vec<String>,
2324
}
2425

@@ -27,6 +28,7 @@ pub struct ExplainRequestProjectInput {
2728
pub example: Example,
2829
pub change_set: RuleChangeSet,
2930
pub max_hops: u8,
31+
#[serde(default)]
3032
pub project_domains: Vec<String>,
3133
}
3234

src/api/impact.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub struct ImpactInput {
1616
pub router_config: RouterConfig,
1717
pub max_hops: u8,
1818
pub with_redirection_loop: bool,
19+
#[serde(default)]
1920
pub domains: Vec<String>,
2021
pub rule: Rule,
2122
pub action: String,
@@ -26,6 +27,7 @@ pub struct ImpactInput {
2627
pub struct ImpactProjectInput {
2728
pub max_hops: u8,
2829
pub with_redirection_loop: bool,
30+
#[serde(default)]
2931
pub domains: Vec<String>,
3032
pub rule: Rule,
3133
pub action: String,

src/api/test_examples.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ pub struct TestExamplesInput {
2222
pub router_config: RouterConfig,
2323
pub rules: Vec<Rule>,
2424
pub max_hops: u8,
25+
#[serde(default)]
2526
pub project_domains: Vec<String>,
2627
}
2728

2829
#[derive(Deserialize, Debug, Clone, Default)]
2930
pub struct TestExamplesProjectInput {
3031
pub change_set: RuleChangeSet,
3132
pub max_hops: u8,
33+
#[serde(default)]
3234
pub project_domains: Vec<String>,
3335
}
3436

0 commit comments

Comments
 (0)