echoapi-converter 0.0.15 → 0.0.17

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1475,8 +1475,8 @@ class SwaggerToApipost {
1475
1475
  }
1476
1476
  }
1477
1477
  handlePathV3(path, pathItem, tags) {
1478
- var _a, _b, _c, _d, _e, _f, _g, _h;
1479
1478
  return __awaiter(this, void 0, void 0, function* () {
1479
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1480
1480
  let url = path;
1481
1481
  for (const method in pathItem) {
1482
1482
  const swaggerApi = pathItem[method];
@@ -1893,8 +1893,8 @@ class SwaggerToApipost {
1893
1893
  });
1894
1894
  }
1895
1895
  handlePathsV3(json) {
1896
- var _a, _b;
1897
1896
  return __awaiter(this, void 0, void 0, function* () {
1897
+ var _a, _b;
1898
1898
  try {
1899
1899
  const paths = ((_a = json === null || json === void 0 ? void 0 : json.openapi) === null || _a === void 0 ? void 0 : _a.paths) || json.paths;
1900
1900
  const tags = ((_b = json === null || json === void 0 ? void 0 : json.openapi) === null || _b === void 0 ? void 0 : _b.tags) || json.tags;
@@ -1926,8 +1926,8 @@ class SwaggerToApipost {
1926
1926
  }
1927
1927
  }
1928
1928
  handlePath(path, pathItem, tags) {
1929
- var _a, _b, _c, _d, _e, _f, _g, _h;
1930
1929
  return __awaiter(this, void 0, void 0, function* () {
1930
+ var _a, _b, _c, _d, _e, _f, _g, _h;
1931
1931
  let url = path;
1932
1932
  url = decodeURI(this.basePath + url);
1933
1933
  url = fixUrlPath(url);
@@ -2334,8 +2334,8 @@ class SwaggerToApipost {
2334
2334
  catch (err) { }
2335
2335
  });
2336
2336
  }
2337
- convert(json, options = null) {
2338
- return __awaiter(this, void 0, void 0, function* () {
2337
+ convert(json_1) {
2338
+ return __awaiter(this, arguments, void 0, function* (json, options = null) {
2339
2339
  this.clear();
2340
2340
  try {
2341
2341
  if (options && options instanceof Object) {
@@ -2716,7 +2716,7 @@ class ApidocToApipost {
2716
2716
  }
2717
2717
 
2718
2718
  // @ts-nocheck
2719
- const throwResult = (status, message, data = "") => {
2719
+ const throwResult = (status, message, data) => {
2720
2720
  return {
2721
2721
  status,
2722
2722
  message,
@@ -5501,9 +5501,11 @@ class ThunderToApipost {
5501
5501
  }
5502
5502
  }
5503
5503
  else {
5504
- asserts.push(this.diyScript(test === null || test === void 0 ? void 0 : test.action, test));
5504
+ this.diyScript(test === null || test === void 0 ? void 0 : test.action, test) &&
5505
+ asserts.push(this.diyScript(test === null || test === void 0 ? void 0 : test.action, test));
5505
5506
  }
5506
5507
  });
5508
+ return asserts;
5507
5509
  }
5508
5510
  return [];
5509
5511
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "echoapi-converter",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "echoapi to swagger",
5
5
  "main": "dist/index.js",
6
6
  "files": [