@dazhicheng/openapi 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/util.d.ts DELETED
@@ -1,35 +0,0 @@
1
- export declare const getAbsolutePath: (filePath: string) => string;
2
- export declare const mkdir: (dir: string) => void;
3
- export declare const prettierFile: (content: string) => Promise<[string, boolean]>;
4
- export declare const writeFile: (folderPath: string, fileName: string, content: string) => Promise<boolean>;
5
- export declare const getTagName: (name: string) => string | undefined;
6
- /**
7
- * 根据当前的数据源类型,对请求回来的 apiInfo 进行格式化
8
- * 如果是 op 数据源,对 tags 以及 path 中的 tags 进行处理
9
- * - before: 前缀(产品集.产品码) + 操作对象(必填)+ 子操作对象(可选)+ 动作(必填)
10
- * - after: 操作对象(必填)+ 子操作对象(可选) ==> 驼峰
11
- */
12
- export declare const formatApiInfo: (apiInfo: Record<string, any>) => any;
13
- type serviceParam = {
14
- title: string;
15
- type: string;
16
- description: string;
17
- default: string;
18
- [key: string]: any;
19
- };
20
- type serviceParams = Record<string, serviceParam>;
21
- /**
22
- * 一方化场景下,由于 onex 会对请求的响应做处理
23
- * 1. 将 Response & Request 中的参数字段会变更为小驼峰写法
24
- * onex 相关代码 : http://gitlab.alipay-inc.com/one-console/sdk/blob/master/src/request.ts#L110
25
- * 2. 另外要注意:
26
- * op 返回的数据,请求参数的类型格式 需要做额外的处理
27
- * - (name) key.n, (type) string ==> key: string []
28
- * - (name) key.m, (type) string ===> key: string []
29
- * - (name) key.key1 , (type) string ==> key: {key1:string}
30
- * - (name) key.n.key1 ,(type) string => key:{ key1 :string}[]
31
- * - (name) key.n.key1.m,(type) string ==> key:{key1: string[]}[]
32
- */
33
- export declare function formatParamsForYFH(params: serviceParams, paramsObject?: serviceParams): serviceParams;
34
- export declare const stripDot: (str: string) => string;
35
- export {};