File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
server/node-service/src/plugins/woocommerce Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ const wooCommercePlugin: DataSourcePlugin<any, DataSourceConfigType> = {
78
78
icon : "woocommerce.svg" ,
79
79
category : "api" ,
80
80
dataSourceConfig,
81
- queryConfig : async ( ) => {
82
- const { actions, categories } = await parseOpenApi ( spec as OpenAPI . Document , parseOptions ) ;
81
+ queryConfig : async ( data ) => {
82
+ const { actions, categories } = await parseOpenApi ( specs [ data . specVersion as keyof typeof specs ] as OpenAPI . Document , parseOptions ) ;
83
83
return {
84
84
type : "query" ,
85
85
label : "Operation" ,
@@ -98,7 +98,7 @@ const wooCommercePlugin: DataSourcePlugin<any, DataSourceConfigType> = {
98
98
dynamicParamsConfig : otherDataSourceConfig ,
99
99
specVersion : dataSourceConfig . specVersion
100
100
} ;
101
- return runOpenApi ( actionData , runApiDsConfig , spec as unknown as OpenAPIV2 . Document ) ;
101
+ return runOpenApi ( actionData , runApiDsConfig , specs [ dataSourceConfig . specVersion as keyof typeof specs ] as unknown as OpenAPIV2 . Document ) ;
102
102
} ,
103
103
} ;
104
104
You can’t perform that action at this time.
0 commit comments