mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-05 22:34:22 +03:00
a72d45d165
This PR introduces support for multiple versions of the ndc-spec by adding a new `VersionedSchemaAndCapabilities` enum variant under the `DataConnectorLink` in OpenDD. This allows the capture of both ndc v0.1.* and v0.2.* schema and capabilities. This is achieved by referencing the `ndc-models` crate twice, once for `v0.1.4` and once for the first commit after `v0.1.4`. That commit was chosen to avoid actual v0.2.0 breaking changes for now, while we lay in this multiple version support plumbing. Future PRs will use a newer commit and adopt the breaking changes where necessary. The `VersionedSchemaAndCapabilities::V02` variant uses the the v0.2 reference of `ndc-models`. Then, during metadata resolve, when we resolve the `DataConnectorContext` from `DataConnectorLink`, we perform a migration of v0.1 types to v0.2 types and store and use the v0.2 types during metadata resolve. This migration is performed in the new module `ndc_migration`. We also record the `NdcVersion` (either `V01` or `V02`) in the `DataConnectorLink`. The `execute` crate will need to use this to determine which version to send to the connector at runtime (to be implemented in a future PR). The new changes to OpenDD are hidden from the JSON Schema via a new `UnstableFeatures` flag, and the use of the new variant is gated behind it in metadata resolve, since we don't yet support it upstream in the `execute` crate. V3_GIT_ORIGIN_REV_ID: d6d8a768ea3537c0b5e620799e94d3dd1e529526
39 lines
995 B
TOML
39 lines
995 B
TOML
[package]
|
|
name = "open-dds"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[lib]
|
|
bench = false
|
|
|
|
[dependencies]
|
|
jsonschema-tidying = { path = "../utils/jsonschema-tidying" }
|
|
opendds-derive = { path = "../utils/opendds-derive" }
|
|
|
|
derive_more = { workspace = true }
|
|
indexmap = { workspace = true, features = ["serde"] }
|
|
ndc-models = { workspace = true }
|
|
ndc-models-v01 = { workspace = true }
|
|
ref-cast = { workspace = true }
|
|
schemars = { workspace = true, features = ["smol_str", "preserve_order"] }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true, features = ["preserve_order"] }
|
|
serde_path_to_error = { workspace = true }
|
|
smol_str = { workspace = true }
|
|
strum = { workspace = true }
|
|
strum_macros = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
goldenfile = { workspace = true }
|
|
pretty_assertions = { workspace = true }
|
|
|
|
[package.metadata.cargo-machete]
|
|
ignored = [
|
|
"strum", # used by strum_macros
|
|
]
|
|
|
|
[lints]
|
|
workspace = true
|