@xtdev/swaggerv2-to-ts
Advanced tools
@@ -119,1 +119,6 @@ #!/usr/bin/env node | ||
}; | ||
start({ | ||
url: 'https://gateway-dev1.tanjiu.cn/taozhu/v2/api-docs', | ||
outFile: './temp/service.ts', | ||
paths: ['/trade/instance/banquet/queryBanquetDetail'] | ||
}); |
@@ -33,7 +33,14 @@ import https from 'https'; | ||
else if (type === 'array') { | ||
temp = ` | ||
/** ${description} */ | ||
${key}: { | ||
${paramsKeys2Comments(children)} | ||
}[];`; | ||
if (typeof (children) !== 'object') { | ||
temp = ` | ||
/** ${description} */ | ||
${key}: ${children}[];`; | ||
} | ||
else { | ||
temp = ` | ||
/** ${description} */ | ||
${key}: { | ||
${paramsKeys2Comments(children)} | ||
}[];`; | ||
} | ||
} | ||
@@ -40,0 +47,0 @@ else if (type === 'object') { |
{ | ||
"name": "@xtdev/swaggerv2-to-ts", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "将swagger V2.0 转换成TS接口服务", | ||
@@ -5,0 +5,0 @@ "type": "module", |
14190
2.63%380
3.26%