Make schema field mandatory in ConnectorLink (#315)

V3_GIT_ORIGIN_REV_ID: 5d782bc8dec8630b5b63821b61ecec615f0ed47f
This commit is contained in:
Abhinav Gupta 2024-02-05 15:10:50 -08:00 committed by hasura-bot
parent 339cc34d06
commit dfd2e940b1
4 changed files with 32 additions and 15 deletions

View File

@ -267,7 +267,14 @@ mod tests {
"url": { "singleUrl": { "value": "http://test.com" } },
"schema": {
"version": "v0.1",
"capabilities": { "versions": "1", "capabilities": { "query": {} }}
"capabilities": { "versions": "1", "capabilities": { "query": {} }},
"schema": {
"scalar_types": {},
"object_types": {},
"collections": [],
"functions": [],
"procedures": []
}
}
}
"#,

View File

@ -515,6 +515,7 @@
"type": "object",
"required": [
"capabilities",
"schema",
"version"
],
"properties": {
@ -525,18 +526,7 @@
]
},
"schema": {
"default": {
"scalar_types": {},
"object_types": {},
"collections": [],
"functions": [],
"procedures": []
},
"allOf": [
{
"$ref": "https://raw.githubusercontent.com/hasura/ndc-spec/v0.1.0-rc.13/ndc-client/tests/json_schema/schema_response.jsonschema"
}
]
},
"capabilities": {
"$ref": "https://raw.githubusercontent.com/hasura/ndc-spec/v0.1.0-rc.13/ndc-client/tests/json_schema/capabilities_response.jsonschema"

View File

@ -58,7 +58,6 @@ pub enum VersionedSchemaAndCapabilities {
#[schemars(title = "SchemaAndCapabilitiesV01")]
pub struct SchemaAndCapabilitiesV01 {
#[schemars(schema_with = "ndc_schema_response_v01_schema_reference")]
#[serde(default)]
pub schema: SchemaResponse,
#[schemars(schema_with = "ndc_capabilities_response_v01_schema_reference")]
pub capabilities: CapabilitiesResponse,
@ -94,6 +93,13 @@ mod tests {
"capabilities": {
"query": {}
}
},
"schema": {
"scalar_types": {},
"object_types": {},
"collections": [],
"functions": [],
"procedures": []
}
}
}
@ -123,6 +129,13 @@ mod tests {
"capabilities": {
"query": {}
}
},
"schema": {
"scalar_types": {},
"object_types": {},
"collections": [],
"functions": [],
"procedures": []
}
}
}

View File

@ -62,6 +62,13 @@ impl DataConnectorLinkV1 {
"variables": {}
}
}
},
"schema": {
"scalar_types": {},
"object_types": {},
"collections": [],
"functions": [],
"procedures": []
}
}
}