Skip to content

Commit f81c918

Browse files
goffrieConvex, Inc.
authored andcommitted
Remove schemars dependency from fivetran_source (#43723)
GitOrigin-RevId: 30827b07e4584528832e7b020dde1ebcf3f30d4e
1 parent 4dbcd57 commit f81c918

File tree

4 files changed

+0
-46
lines changed

4 files changed

+0
-46
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ rustls = { version = "0.23", default-features = false }
199199
rustls-native-certs = { version = "0.8" }
200200
rustls-pki-types = { version = "1" }
201201
saffron = { git = "https://github.com/get-convex/saffron", rev = "1d842379919fb5c1988ac127cebd6167b1eb9bec", features = [ "std" ] }
202-
schemars = { version = "0.8" }
203202
semver = { version = "1", features = [ "serde" ] }
204203
sentry = { version = "0.37", features = [ "anyhow", "tower", "tower-http" ] }
205204
sentry-tracing = "0.37"

crates/fivetran_source/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ pretty_assertions = { workspace = true }
5555
proptest = { workspace = true }
5656
proptest-derive = { workspace = true }
5757
rand = { workspace = true }
58-
schemars = { version = "0.8" }
5958
uuid = { workspace = true }
6059

6160
[lints]

crates/fivetran_source/src/convex_api.rs

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -346,51 +346,8 @@ impl SnapshotValue for DocumentDeltasValue {
346346

347347
#[cfg(test)]
348348
mod tests {
349-
use core::panic;
350-
351-
use schemars::schema::Schema;
352-
use serde_json::json;
353-
354349
use super::*;
355350

356-
#[derive(Deserialize)]
357-
pub struct DatabaseSchema(pub BTreeMap<TableName, Schema>);
358-
359-
#[test]
360-
fn can_deserialize_schema() {
361-
let json = json!({
362-
"emptyTable": false,
363-
"table": json!({
364-
"type": "object",
365-
"properties": json!({
366-
"_creationTime": json!({ "type": "number" }),
367-
"_id": json!({
368-
"$description": "Id(messages)",
369-
"type": "string"
370-
}),
371-
"author": json!({ "type": "string" }),
372-
"body": json!({ "type": "string" }),
373-
"_table": json!({ "type": "string" }),
374-
"_ts": json!({ "type": "integer" }),
375-
"_deleted": json!({ "type": "boolean" }),
376-
}),
377-
"additionalProperties": false,
378-
"required": vec!["_creationTime", "_id", "author", "body"],
379-
"$schema": "http://json-schema.org/draft-07/schema#",
380-
}),
381-
});
382-
383-
let schema: DatabaseSchema = serde_json::from_value(json).unwrap();
384-
385-
let Schema::Bool(_) = schema.0.get(&"emptyTable".into()).unwrap() else {
386-
panic!();
387-
};
388-
let Schema::Object(schema_object) = schema.0.get(&"table".into()).unwrap() else {
389-
panic!();
390-
};
391-
assert!(schema_object.object.is_some());
392-
}
393-
394351
#[test]
395352
fn test_table_path_for_state_root_component() {
396353
let snapshot_value = ListSnapshotValue {

0 commit comments

Comments
 (0)