diff --git a/Cargo.lock b/Cargo.lock index 6824503..b269427 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -953,14 +953,16 @@ dependencies = [ [[package]] name = "ndc-models" -version = "0.1.4" -source = "git+http://github.com/hasura/ndc-spec.git?rev=002923d5c337930b9c9007f05c768fe9a0575612#002923d5c337930b9c9007f05c768fe9a0575612" +version = "0.1.5" +source = "git+http://github.com/hasura/ndc-spec.git?tag=v0.1.5#78f52768bd02a8289194078a5abc2432c8e3a758" dependencies = [ "indexmap 2.2.6", + "ref-cast", "schemars", "serde", "serde_json", "serde_with", + "smol_str", ] [[package]] @@ -998,8 +1000,8 @@ dependencies = [ [[package]] name = "ndc-test" -version = "0.1.4" -source = "git+http://github.com/hasura/ndc-spec.git?rev=002923d5c337930b9c9007f05c768fe9a0575612#002923d5c337930b9c9007f05c768fe9a0575612" +version = "0.1.5" +source = "git+http://github.com/hasura/ndc-spec.git?tag=v0.1.5#78f52768bd02a8289194078a5abc2432c8e3a758" dependencies = [ "async-trait", "clap", @@ -1011,6 +1013,7 @@ dependencies = [ "semver", "serde", "serde_json", + "smol_str", "thiserror", "tokio", "url", @@ -1415,6 +1418,26 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "ref-cast" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.55", +] + [[package]] name = "regex" version = "1.10.4" diff --git a/crates/sdk/Cargo.toml b/crates/sdk/Cargo.toml index 5b8b347..d24abd8 100644 --- a/crates/sdk/Cargo.toml +++ b/crates/sdk/Cargo.toml @@ -24,8 +24,8 @@ rustls = ["reqwest/rustls"] ndc-test = ["dep:ndc-test"] [dependencies] -ndc-models = { git = "http://github.com/hasura/ndc-spec.git", rev = "002923d5c337930b9c9007f05c768fe9a0575612"} -ndc-test = { git = "http://github.com/hasura/ndc-spec.git", rev = "002923d5c337930b9c9007f05c768fe9a0575612", optional = true } +ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.5" } +ndc-test = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.5", optional = true } async-trait = "0.1.79" axum = { version = "0.6.20", features = ["http2"] } diff --git a/crates/sdk/src/connector/example.rs b/crates/sdk/src/connector/example.rs index 8ad8e01..c173bbc 100644 --- a/crates/sdk/src/connector/example.rs +++ b/crates/sdk/src/connector/example.rs @@ -142,8 +142,7 @@ mod tests { assert_eq!(response.status(), StatusCode::OK); let body: ndc_models::CapabilitiesResponse = response.json().await; - // ideally we would get this version from `ndc_models::VERSION` - assert_eq!(body.version, "0.1.4"); + assert_eq!(body.version, ndc_models::VERSION); Ok(()) } }