swagger-typescript-api 13.11.2 → 13.12.1

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.
@@ -208,7 +208,7 @@ var ComponentTypeNameResolver = class extends NameResolver {
208
208
  //#endregion
209
209
  //#region package.json
210
210
  var name = "swagger-typescript-api";
211
- var version = "13.11.2";
211
+ var version = "13.12.1";
212
212
  var description = "Generate the API client for Fetch or Axios from an OpenAPI Specification";
213
213
  //#endregion
214
214
  //#region src/constants.ts
@@ -322,7 +322,7 @@ var CodeGenConfig = class {
322
322
  generateRouteTypes = false;
323
323
  /** CLI flag */
324
324
  generateClient = true;
325
- /** CLI flag. Controls enum output format: "enum" (default), "union" (T1 | T2 | TN), or "const" (as const object + type alias). */
325
+ /** CLI flag. Controls enum output format: "enum" (default), "union" (T1 | T2 | TN), "const" (as const object + type alias), or "const-enum" (const enum). */
326
326
  enumStyle = "enum";
327
327
  /** @deprecated Use enumStyle: "union" instead */
328
328
  generateUnionEnums = false;
@@ -722,6 +722,7 @@ const OPENAPI_COMPONENT_NAMES = new Set([
722
722
  "pathItems"
723
723
  ]);
724
724
  var SchemaComponentsMap = class {
725
+ config;
725
726
  _data = [];
726
727
  constructor(config) {
727
728
  this.config = config;
@@ -1357,7 +1358,7 @@ var EnumSchemaParser = class extends MonoSchemaParser {
1357
1358
  schemaType: SCHEMA_TYPES$1.ENUM,
1358
1359
  type: SCHEMA_TYPES$1.ENUM,
1359
1360
  keyType,
1360
- typeIdentifier: this.config.enumStyle === "const" ? this.config.Ts.Keyword.Const : this.config.enumStyle === "union" ? this.config.Ts.Keyword.Type : this.config.Ts.Keyword.Enum,
1361
+ typeIdentifier: this.config.enumStyle === "const" ? this.config.Ts.Keyword.Const : this.config.enumStyle === "const-enum" ? `${this.config.Ts.Keyword.Const} ${this.config.Ts.Keyword.Enum}` : this.config.enumStyle === "union" ? this.config.Ts.Keyword.Type : this.config.Ts.Keyword.Enum,
1361
1362
  name: this.typeName,
1362
1363
  description: this.schemaFormatters.formatDescription(this.schema.description),
1363
1364
  content
@@ -1643,6 +1644,9 @@ var SchemaParser = class {
1643
1644
  //#endregion
1644
1645
  //#region src/schema-parser/schema-utils.ts
1645
1646
  var SchemaUtils = class {
1647
+ config;
1648
+ schemaComponentsMap;
1649
+ typeNameFormatter;
1646
1650
  constructor(config, schemaComponentsMap, typeNameFormatter) {
1647
1651
  this.config = config;
1648
1652
  this.schemaComponentsMap = schemaComponentsMap;
@@ -1908,6 +1912,11 @@ const CONTENT_KIND = {
1908
1912
  */
1909
1913
  const MAX_EXTRACT_SCHEMA_KEY_COLLISION_ATTEMPTS = 32;
1910
1914
  var SchemaRoutes = class {
1915
+ config;
1916
+ schemaParserFabric;
1917
+ schemaComponentsMap;
1918
+ templatesWorker;
1919
+ typeNameFormatter;
1911
1920
  schemaUtils;
1912
1921
  FORM_DATA_TYPES = [];
1913
1922
  routes = [];
@@ -2705,6 +2714,10 @@ function parseSchemaContent(content) {
2705
2714
  //#endregion
2706
2715
  //#region src/resolved-swagger-schema.ts
2707
2716
  var ResolvedSwaggerSchema = class ResolvedSwaggerSchema {
2717
+ config;
2718
+ usageSchema;
2719
+ originalSchema;
2720
+ resolvers;
2708
2721
  parsedRefsCache = /* @__PURE__ */ new Map();
2709
2722
  externalSchemaCache = /* @__PURE__ */ new Map();
2710
2723
  httpMethodSegments = new Set([
@@ -4170,4 +4183,4 @@ Object.defineProperty(exports, "version", {
4170
4183
  }
4171
4184
  });
4172
4185
 
4173
- //# sourceMappingURL=src-B2ssuwoK.cjs.map
4186
+ //# sourceMappingURL=src-Cs9lMkwK.cjs.map