From 02b20f1102ebc05f3c292eae68df8c8a9e2b7417 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 9 Jan 2025 14:24:59 +0100 Subject: [PATCH 1/2] Fix getSchema from forms --- packages/client/src/utils/schema.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/utils/schema.js b/packages/client/src/utils/schema.js index ffab142cf3..4a65d2d099 100644 --- a/packages/client/src/utils/schema.js +++ b/packages/client/src/utils/schema.js @@ -52,7 +52,7 @@ export const fetchDatasourceSchema = async ( // Get the normal schema as long as we aren't wanting a form schema let schema if (datasource?.type !== "query" || !options?.formSchema) { - schema = instance.getSchema(datasource, definition) + schema = instance.getSchema(definition) } else if (definition.parameters?.length) { schema = {} definition.parameters.forEach(param => { From ff0a25f0ffadf727418f757736fcc0b6091ff412 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 9 Jan 2025 14:32:15 +0100 Subject: [PATCH 2/2] Pass datasource to instance --- packages/client/src/utils/schema.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/utils/schema.js b/packages/client/src/utils/schema.js index 4a65d2d099..60800afc53 100644 --- a/packages/client/src/utils/schema.js +++ b/packages/client/src/utils/schema.js @@ -31,7 +31,7 @@ const getDatasourceFetchInstance = datasource => { if (!handler) { return null } - return new handler({ API }) + return new handler({ API, datasource }) } /**