Skip to content

Commit c85bc96

Browse files
author
FalkWolsky
committed
Fixing bearerAuth Scheme in Node Service
1 parent 5f7f181 commit c85bc96

File tree

11 files changed

+9752
-507
lines changed

11 files changed

+9752
-507
lines changed

server/node-service/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"prom-client": "^14.2.0",
7272
"proxy-agent": "^5.0.0",
7373
"stylis": "^4.3.0",
74-
"swagger-client": "^3.31.0",
74+
"swagger-client": "^3.32.2",
7575
"typescript": "^4.9.3",
7676
"yaml": "^2.6.0"
7777
},

server/node-service/src/plugins/lowcoder/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ import { ConfigToType, DataSourcePlugin } from "lowcoder-sdk/dataSource";
66
import { runOpenApi } from "../openApi";
77
import { parseOpenApi, ParseOpenApiOptions } from "../openApi/parse";
88

9-
import spec from './lowcoder.spec.json';
9+
import spec10 from './lowcoder.spec-v1.0.json';
10+
import spec11 from './lowcoder.spec-v1.1.json';
11+
1012
const specs = {
11-
"v1.0": spec,
13+
"v1.0": spec10,
14+
"v1.1": spec11,
1215
}
1316

1417
const dataSourceConfig = {
@@ -22,11 +25,6 @@ const dataSourceConfig = {
2225
placeholder: "https://<your-lowcoder-api-service>:port",
2326
tooltip: "Input the server url of your self-hosting instance or api-service.lowcoder.cloud if you are running your apps on the free public Community Edition Cloud Service.",
2427
},
25-
{
26-
"type": "groupTitle",
27-
"key": "API Key",
28-
"label": "Api Key Auth"
29-
},
3028
{
3129
type: "password",
3230
key: "bearerAuth.value",
@@ -72,13 +70,15 @@ const lowcoderPlugin: DataSourcePlugin<any, DataSourceConfigType> = {
7270
};
7371
},
7472
run: function (actionData, dataSourceConfig): Promise<any> {
75-
const { serverURL, ...otherDataSourceConfig } = dataSourceConfig;
73+
const { serverURL, specVersion, dynamicParamsConfig, ...otherDataSourceConfig } = dataSourceConfig;
74+
7675
const runApiDsConfig = {
7776
url: "",
7877
serverURL: serverURL,
7978
dynamicParamsConfig: otherDataSourceConfig,
80-
specVersion: dataSourceConfig.specVersion,
79+
specVersion: specVersion
8180
};
81+
8282
return runOpenApi(actionData, runApiDsConfig, version2spec(specs, dataSourceConfig.specVersion) as OpenAPIV3.Document);
8383
},
8484
};

0 commit comments

Comments
 (0)