echoapi-converter 0.0.12 → 0.0.13
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/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1459,7 +1459,7 @@ class SwaggerToApipost {
|
|
|
1459
1459
|
if (Object.prototype.toString.call(swaggerApi) !== '[object Object]')
|
|
1460
1460
|
return;
|
|
1461
1461
|
if (lodash.has(swaggerApi, 'tags') && swaggerApi.tags.length > 0) {
|
|
1462
|
-
this.handleTags(swaggerApi.tags, tags);
|
|
1462
|
+
this.handleTags(lodash.uniq(swaggerApi.tags), tags);
|
|
1463
1463
|
}
|
|
1464
1464
|
const api = {
|
|
1465
1465
|
name: (swaggerApi === null || swaggerApi === void 0 ? void 0 : swaggerApi.summary) || (swaggerApi === null || swaggerApi === void 0 ? void 0 : swaggerApi.__originalOperationId) || (swaggerApi === null || swaggerApi === void 0 ? void 0 : swaggerApi.operationId) || 'New HTTP',
|
|
@@ -1832,7 +1832,7 @@ class SwaggerToApipost {
|
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
1834
|
if (lodash.has(swaggerApi, 'tags') && swaggerApi.tags.length > 0) {
|
|
1835
|
-
for (const folder of swaggerApi.tags) {
|
|
1835
|
+
for (const folder of lodash.uniq(swaggerApi.tags)) {
|
|
1836
1836
|
if (lodash.has(this.folders, folder)) {
|
|
1837
1837
|
this.folders[folder].children.push(api);
|
|
1838
1838
|
}
|
|
@@ -1888,7 +1888,7 @@ class SwaggerToApipost {
|
|
|
1888
1888
|
if (Object.prototype.toString.call(swaggerApi) !== '[object Object]')
|
|
1889
1889
|
return;
|
|
1890
1890
|
if (lodash.has(swaggerApi, 'tags') && swaggerApi.tags.length > 0) {
|
|
1891
|
-
this.handleTags(swaggerApi.tags, tags);
|
|
1891
|
+
this.handleTags(lodash.uniq(swaggerApi.tags), tags);
|
|
1892
1892
|
}
|
|
1893
1893
|
let api = {
|
|
1894
1894
|
// __originalOperationId swagger-client转换完后编码不支持中文
|
|
@@ -2232,7 +2232,7 @@ class SwaggerToApipost {
|
|
|
2232
2232
|
}
|
|
2233
2233
|
}
|
|
2234
2234
|
if (lodash.has(swaggerApi, 'tags') && swaggerApi.tags.length > 0) {
|
|
2235
|
-
for (const folder of swaggerApi.tags) {
|
|
2235
|
+
for (const folder of lodash.uniq(swaggerApi.tags)) {
|
|
2236
2236
|
if (lodash.has(this.folders, folder)) {
|
|
2237
2237
|
if (Object.prototype.toString.call(this.folders[folder].children) === '[object Array]') {
|
|
2238
2238
|
this.folders[folder].children.push(Object.assign(Object.assign({}, api), { sort: this.folders[folder].children.length + 1 }));
|