swagger-typescript-api 13.2.5 → 13.2.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.
@@ -181,7 +181,7 @@ const getRandomInt = (min = 0, max = 1) => {
181
181
  var ComponentTypeNameResolver = class extends NameResolver {
182
182
  counter = 1;
183
183
  fallbackNameCounter = 1;
184
- countersByVariant = /* @__PURE__ */ new Map();
184
+ countersByVariant = new Map();
185
185
  constructor(config, reservedNames) {
186
186
  super(config, reservedNames, (variants) => {
187
187
  const randomVariant = variants[getRandomInt(0, variants.length - 1)];
@@ -203,7 +203,7 @@ var ComponentTypeNameResolver = class extends NameResolver {
203
203
  //#endregion
204
204
  //#region package.json
205
205
  var name = "swagger-typescript-api";
206
- var version = "13.2.5";
206
+ var version = "13.2.6";
207
207
  var description = "Generate the API client for Fetch or Axios from an OpenAPI Specification";
208
208
  var homepage = "https://github.com/acacode/swagger-typescript-api";
209
209
  var bugs = "https://github.com/acacode/swagger-typescript-api/issues";
@@ -265,11 +265,11 @@ var devDependencies = {
265
265
  "@tsconfig/strictest": "2.0.5",
266
266
  "@types/js-yaml": "4.0.9",
267
267
  "@types/lodash": "4.17.18",
268
- "@types/node": "24.0.3",
268
+ "@types/node": "24.0.4",
269
269
  "@types/swagger2openapi": "7.0.4",
270
270
  "axios": "1.10.0",
271
271
  "openapi-types": "12.1.3",
272
- "tsdown": "0.12.8",
272
+ "tsdown": "0.12.9",
273
273
  "typedoc": "0.28.5",
274
274
  "vitest": "3.2.4"
275
275
  };
@@ -452,7 +452,7 @@ var CodeGenConfig = class {
452
452
  httpClient: "http-client",
453
453
  outOfModuleApi: "Common"
454
454
  };
455
- routeNameDuplicatesMap = /* @__PURE__ */ new Map();
455
+ routeNameDuplicatesMap = new Map();
456
456
  hooks = {
457
457
  onPreBuildRoutePath: (_routePath) => void 0,
458
458
  onBuildRoutePath: (_routeData) => void 0,
@@ -2062,7 +2062,9 @@ var SchemaRoutes = class {
2062
2062
  if (schema?.typeData) schema.typeData.isExtractedRequestBody = true;
2063
2063
  content = this.schemaParserFabric.getInlineParseContent({ $ref: schema.$ref });
2064
2064
  }
2065
+ if (schema && schema.typeData && !schema.typeData.description && requestBody?.description) schema.typeData.description = requestBody.description;
2065
2066
  return {
2067
+ ...requestBody || {},
2066
2068
  paramName: requestBodyName || requestBody?.name || DEFAULT_BODY_ARG_NAME,
2067
2069
  contentTypes,
2068
2070
  contentKind,
@@ -2244,6 +2246,7 @@ var SchemaRoutes = class {
2244
2246
  type: queryType
2245
2247
  } : void 0,
2246
2248
  body: requestBodyInfo.type ? {
2249
+ ...requestBodyInfo,
2247
2250
  name: nameResolver.resolve([requestBodyInfo.paramName, ...RESERVED_BODY_ARG_NAMES]),
2248
2251
  optional: !requestBodyInfo.required,
2249
2252
  type: requestBodyInfo.type
@@ -2364,8 +2367,8 @@ var SchemaRoutes = class {
2364
2367
  var SchemaWalker = class {
2365
2368
  config;
2366
2369
  swaggerSchemaResolver;
2367
- schemas = /* @__PURE__ */ new Map();
2368
- caches = /* @__PURE__ */ new Map();
2370
+ schemas = new Map();
2371
+ caches = new Map();
2369
2372
  constructor(config, swaggerSchemaResolver) {
2370
2373
  this.config = config;
2371
2374
  this.swaggerSchemaResolver = swaggerSchemaResolver;
@@ -2654,7 +2657,7 @@ var JavascriptTranslator = class extends Translator {
2654
2657
  //#endregion
2655
2658
  //#region src/type-name-formatter.ts
2656
2659
  var TypeNameFormatter = class {
2657
- formattedModelNamesMap = /* @__PURE__ */ new Map();
2660
+ formattedModelNamesMap = new Map();
2658
2661
  config;
2659
2662
  constructor(config) {
2660
2663
  this.config = config;
@@ -3232,4 +3235,4 @@ Object.defineProperty(exports, 'package_default', {
3232
3235
  return package_default;
3233
3236
  }
3234
3237
  });
3235
- //# sourceMappingURL=src-B15eFEWm.cjs.map
3238
+ //# sourceMappingURL=src-CKol_ydn.cjs.map