swagger-typescript-api 13.6.6 → 13.6.7
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/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-B-lBUhqS.mjs → src--O_oZouc.mjs} +8 -14
- package/dist/src--O_oZouc.mjs.map +1 -0
- package/dist/{src-BROE-dEG.cjs → src-CUhSthD5.cjs} +8 -14
- package/dist/src-CUhSthD5.cjs.map +1 -0
- package/package.json +3 -3
- package/dist/src-B-lBUhqS.mjs.map +0 -1
- package/dist/src-BROE-dEG.cjs.map +0 -1
|
@@ -182,12 +182,6 @@ var NameResolver = class {
|
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
184
|
//#endregion
|
|
185
|
-
//#region src/util/random.ts
|
|
186
|
-
const getRandomInt = (min = 0, max = 1) => {
|
|
187
|
-
if (min === max) return min;
|
|
188
|
-
return Math.round(Math.random() * (max - min) + min);
|
|
189
|
-
};
|
|
190
|
-
//#endregion
|
|
191
185
|
//#region src/component-type-name-resolver.ts
|
|
192
186
|
var ComponentTypeNameResolver = class extends NameResolver {
|
|
193
187
|
counter = 1;
|
|
@@ -195,12 +189,12 @@ var ComponentTypeNameResolver = class extends NameResolver {
|
|
|
195
189
|
countersByVariant = /* @__PURE__ */ new Map();
|
|
196
190
|
constructor(config, reservedNames) {
|
|
197
191
|
super(config, reservedNames, (variants) => {
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
200
|
-
if (!this.countersByVariant.has(
|
|
201
|
-
const variantCounter = this.countersByVariant.get(
|
|
202
|
-
this.countersByVariant.set(
|
|
203
|
-
const dirtyResolvedName = `${
|
|
192
|
+
const baseVariant = (0, es_toolkit.uniq)((0, es_toolkit.compact)(variants)).sort((a, b) => a.localeCompare(b))[0];
|
|
193
|
+
if (baseVariant) {
|
|
194
|
+
if (!this.countersByVariant.has(baseVariant)) this.countersByVariant.set(baseVariant, 0);
|
|
195
|
+
const variantCounter = this.countersByVariant.get(baseVariant) + 1;
|
|
196
|
+
this.countersByVariant.set(baseVariant, variantCounter);
|
|
197
|
+
const dirtyResolvedName = `${baseVariant}${variantCounter}`;
|
|
204
198
|
consola.consola.debug("generated dirty resolved type name for component - ", dirtyResolvedName);
|
|
205
199
|
return dirtyResolvedName;
|
|
206
200
|
}
|
|
@@ -213,7 +207,7 @@ var ComponentTypeNameResolver = class extends NameResolver {
|
|
|
213
207
|
//#endregion
|
|
214
208
|
//#region package.json
|
|
215
209
|
var name = "swagger-typescript-api";
|
|
216
|
-
var version = "13.6.
|
|
210
|
+
var version = "13.6.7";
|
|
217
211
|
var description = "Generate the API client for Fetch or Axios from an OpenAPI Specification";
|
|
218
212
|
//#endregion
|
|
219
213
|
//#region src/constants.ts
|
|
@@ -3706,4 +3700,4 @@ Object.defineProperty(exports, "version", {
|
|
|
3706
3700
|
}
|
|
3707
3701
|
});
|
|
3708
3702
|
|
|
3709
|
-
//# sourceMappingURL=src-
|
|
3703
|
+
//# sourceMappingURL=src-CUhSthD5.cjs.map
|