echoapi-converter 0.0.10 → 0.0.11
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 +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1448,7 +1448,7 @@ class SwaggerToApipost {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
1450
1450
|
handlePathV3(path, pathItem, tags) {
|
|
1451
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1451
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1452
1452
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1453
1453
|
let url = path;
|
|
1454
1454
|
for (const method in pathItem) {
|
|
@@ -1531,6 +1531,9 @@ class SwaggerToApipost {
|
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
1533
1533
|
}
|
|
1534
|
+
request['restful'] = {
|
|
1535
|
+
parameter: genRestfulByUrl(url, ((_g = request === null || request === void 0 ? void 0 : request.restful) === null || _g === void 0 ? void 0 : _g.parameter) || []),
|
|
1536
|
+
};
|
|
1534
1537
|
}
|
|
1535
1538
|
if (lodash.has(swaggerApi, 'requestBody') &&
|
|
1536
1539
|
lodash.has(swaggerApi.requestBody, 'content')) {
|
|
@@ -1542,7 +1545,7 @@ class SwaggerToApipost {
|
|
|
1542
1545
|
if (lodash.has(bodyData, 'schema')) {
|
|
1543
1546
|
const { schema } = bodyData;
|
|
1544
1547
|
if ((schema === null || schema === void 0 ? void 0 : schema.type) === 'array') {
|
|
1545
|
-
properties = (
|
|
1548
|
+
properties = (_h = schema === null || schema === void 0 ? void 0 : schema.items) === null || _h === void 0 ? void 0 : _h.properties;
|
|
1546
1549
|
}
|
|
1547
1550
|
else {
|
|
1548
1551
|
properties = schema === null || schema === void 0 ? void 0 : schema.properties;
|
|
@@ -1872,7 +1875,7 @@ class SwaggerToApipost {
|
|
|
1872
1875
|
}
|
|
1873
1876
|
}
|
|
1874
1877
|
handlePath(path, pathItem, tags) {
|
|
1875
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1878
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1876
1879
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1877
1880
|
let url = path;
|
|
1878
1881
|
url = decodeURI(this.basePath + url);
|
|
@@ -2052,6 +2055,9 @@ class SwaggerToApipost {
|
|
|
2052
2055
|
}
|
|
2053
2056
|
}
|
|
2054
2057
|
}
|
|
2058
|
+
request['restful'] = {
|
|
2059
|
+
parameter: genRestfulByUrl(url, ((_h = request === null || request === void 0 ? void 0 : request.restful) === null || _h === void 0 ? void 0 : _h.parameter) || []),
|
|
2060
|
+
};
|
|
2055
2061
|
if (!lodash.isString(request.body.raw)) {
|
|
2056
2062
|
request.body.raw = JSON.stringify(request.body.raw);
|
|
2057
2063
|
}
|