Skip to content

Commit

Permalink
fix nonstandard format filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
mdibaiee committed Nov 1, 2023
1 parent eed0198 commit 21cfab4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions airbyte-to-flow/src/interceptors/fix_document_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ pub fn fix_nonstandard_jsonschema_attributes(schema: &mut serde_json::Value) {
if f == "int32" || f == "int64" {
// Insert updates values
map.insert("format".to_string(), json!("integer"));
} else if let Err(_) = serde_json::from_str::<Format>(f) {
} else if let Err(_) = serde_json::from_value::<Format>(serde_json::Value::String(f.to_string())) {
// a non-standard format output by salesforce connector
map.remove("format");
}
Expand Down Expand Up @@ -535,7 +535,7 @@ mod test {
"items": {
"group": "x",
"type": "string",
"format": "random"
"format": "date-time"
}
},
"airbyte_type": {
Expand Down Expand Up @@ -568,7 +568,8 @@ mod test {
"group": {
"type": "array",
"items": {
"type": "string"
"type": "string",
"format": "date-time"
}
},
"airbyte_type": {
Expand Down

0 comments on commit 21cfab4

Please sign in to comment.