Skip to content

Commit

Permalink
Merge pull request #223 from dora-rs/deny-unknown-field
Browse files Browse the repository at this point in the history
Deny unknown field to avoid typography
  • Loading branch information
phil-opp authored Mar 16, 2023
2 parents 03874c9 + 47e540f commit 49468b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/core/src/descriptor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ pub struct SingleOperatorDefinition {
}

#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(deny_unknown_fields)]
pub struct OperatorConfig {
pub name: Option<String>,
pub description: Option<String>,
Expand Down Expand Up @@ -202,6 +203,7 @@ pub fn resolve_path(source: &str, working_dir: &Path) -> Result<PathBuf> {
}

#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(deny_unknown_fields)]
pub struct PythonOperatorConfig {
pub path: PathBuf,
#[serde(default)]
Expand All @@ -211,6 +213,7 @@ pub struct PythonOperatorConfig {
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct CustomNode {
pub source: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
Expand Down

0 comments on commit 49468b4

Please sign in to comment.