浏览代码

Add object->any type mapping for openapi generator config

Marat Adiyatullin 4 年之前
父节点
当前提交
01213c96db

+ 1 - 1
kafka-ui-contract/src/main/resources/swagger/kafka-ui-api.yaml

@@ -1621,7 +1621,7 @@ components:
     ConnectorConfig:
       type: object
       additionalProperties:
-        type: string
+        type: object
 
     TaskId:
       type: object

+ 4 - 1
kafka-ui-react-app/openapitools.json

@@ -2,7 +2,7 @@
   "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
   "spaces": 2,
   "generator-cli": {
-    "version": "5.0.1",
+    "version": "5.1.1",
     "generators": {
       "fetch": {
         "generatorName": "typescript-fetch",
@@ -14,6 +14,9 @@
           "supportsES6": true,
           "nullSafeAdditionalProps": true,
           "withInterfaces": true
+        },
+        "typeMappings": {
+          "object": "any"
         }
       }
     }

+ 1 - 3
kafka-ui-react-app/src/redux/interfaces/connect.ts

@@ -2,9 +2,7 @@ import { Connect, Connector, FullConnectorInfo, Task } from 'generated-sources';
 
 export type ConnectName = Connect['name'];
 export type ConnectorName = Connector['name'];
-export interface ConnectorConfig {
-  [key: string]: string | undefined;
-}
+export type ConnectorConfig = Connector['config'];
 
 export interface ConnectState {
   connects: Connect[];