openapi-ts-request 1.6.5 → 1.6.6

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.
@@ -121,9 +121,10 @@ class ServiceGenerator {
121
121
  return;
122
122
  }
123
123
  }
124
+ const tagTypeName = (0, util_2.resolveTypeName)(tag);
124
125
  const tagKey = this.config.isCamelCase
125
- ? (0, util_1.camelCase)((0, util_2.resolveTypeName)(tag))
126
- : (0, util_2.resolveTypeName)(tag);
126
+ ? (0, util_1.camelCase)(tagTypeName)
127
+ : (0, lodash_1.lowerFirst)(tagTypeName);
127
128
  if (!this.apiData[tagKey]) {
128
129
  this.apiData[tagKey] = [];
129
130
  }
@@ -366,7 +367,7 @@ class ServiceGenerator {
366
367
  }
367
368
  if (this.config.isGenJsonSchemas) {
368
369
  this.schemaList.push({
369
- typeName: `$${(0, util_2.resolveTypeName)(schemaKey)}`,
370
+ typeName: `$${(0, lodash_1.lowerFirst)((0, util_2.resolveTypeName)(schemaKey))}`,
370
371
  type: JSON.stringify((0, patchSchema_1.patchSchema)(schema, (_a = this.openAPIData.components) === null || _a === void 0 ? void 0 : _a.schemas)),
371
372
  });
372
373
  }
@@ -584,7 +585,7 @@ class ServiceGenerator {
584
585
  var _a, _b, _c;
585
586
  const namespace = this.config.namespace ? `${this.config.namespace}.` : '';
586
587
  const typeName = ((_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.hook) === null || _b === void 0 ? void 0 : _b.customTypeName) === null || _c === void 0 ? void 0 : _c.call(_b, data)) || this.getFunctionName(data);
587
- return (0, util_2.resolveTypeName)(`${namespace}${typeName !== null && typeName !== void 0 ? typeName : data.operationId}Params`);
588
+ return (0, lodash_1.upperFirst)((0, util_2.resolveTypeName)(`${namespace}${typeName !== null && typeName !== void 0 ? typeName : data.operationId}Params`));
588
589
  }
589
590
  getBodyTP(requestBody, namespace) {
590
591
  var _a;
@@ -72,10 +72,10 @@ function resolveTypeName(typeName) {
72
72
  return `Pinyin_${name}`;
73
73
  }
74
74
  if (!/[\u3220-\uFA29]/.test(name) && !/^\d$/.test(name)) {
75
- return name;
75
+ return (0, lodash_1.upperFirst)(name);
76
76
  }
77
77
  const noBlankName = name.replace(/ +/g, '');
78
- return tiny_pinyin_1.default.convertToPinyin(noBlankName, '', true);
78
+ return (0, lodash_1.upperFirst)(tiny_pinyin_1.default.convertToPinyin(noBlankName, '', true));
79
79
  }
80
80
  function getRefName(refObject) {
81
81
  if (!isReferenceObject(refObject)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-ts-request",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
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",