openapi-ts-request 1.8.1 → 1.8.3

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.
@@ -956,7 +956,7 @@ class ServiceGenerator {
956
956
  }).join(',')}}`;
957
957
  }
958
958
  else {
959
- enumLabelTypeStr = `{${(0, lodash_1.map)(enumArray, (value) => `${Number(value)}:"NUMBER_${value}"`).join(',')}}`;
959
+ enumLabelTypeStr = `{${(0, lodash_1.map)(enumArray, (value) => `${Number(value) >= 0 ? Number(value) : `"${value}"`}:"NUMBER_${value}"`).join(',')}}`;
960
960
  }
961
961
  }
962
962
  else if ((0, util_2.isAllNumeric)(enumArray)) {
package/dist/util.js CHANGED
@@ -21,7 +21,7 @@ const getImportStatement = (requestLibPath) => {
21
21
  }
22
22
  return `import request from '${requestLibPath}';`;
23
23
  }
24
- return `import { request } from 'axios';`;
24
+ return `import request from 'axios';`;
25
25
  };
26
26
  exports.getImportStatement = getImportStatement;
27
27
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-ts-request",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "description": "Swagger2/OpenAPI3/Apifox to TypeScript/JavaScript, request client(support any client), request mock service, enum and enum translation, react-query/vue-query, type field label, JSON Schemas",
5
5
  "engines": {
6
6
  "node": ">=18.0.0",
@@ -50,8 +50,8 @@
50
50
  "devDependencies": {
51
51
  "@changesets/changelog-github": "^0.5.0",
52
52
  "@changesets/cli": "^2.27.6",
53
- "@commitlint/cli": "^19.2.1",
54
- "@commitlint/config-conventional": "^19.2.2",
53
+ "@commitlint/cli": "^20.0.0",
54
+ "@commitlint/config-conventional": "^20.0.0",
55
55
  "@tanstack/react-query": "^5.62.10",
56
56
  "@tanstack/vue-query": "^5.62.16",
57
57
  "@types/js-yaml": "^4.0.9",