swagger-typescript-api 13.11.2 → 13.12.0
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 +2 -2
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-C0d8cMi-.mjs → src-DNm4rxFm.mjs} +4 -4
- package/dist/src-DNm4rxFm.mjs.map +1 -0
- package/dist/{src-B2ssuwoK.cjs → src-t0Ockaa6.cjs} +4 -4
- package/dist/src-t0Ockaa6.cjs.map +1 -0
- package/package.json +1 -1
- package/templates/base/data-contracts.ejs +3 -0
- package/templates/base/enum-data-contract.ejs +10 -0
- package/templates/base/http-clients/axios-http-client.ejs +8 -0
- package/templates/base/http-clients/fetch-http-client.ejs +8 -0
- package/dist/src-B2ssuwoK.cjs.map +0 -1
- package/dist/src-C0d8cMi-.mjs.map +0 -1
|
@@ -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.
|
|
211
|
+
var version = "13.12.0";
|
|
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),
|
|
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;
|
|
@@ -1357,7 +1357,7 @@ var EnumSchemaParser = class extends MonoSchemaParser {
|
|
|
1357
1357
|
schemaType: SCHEMA_TYPES$1.ENUM,
|
|
1358
1358
|
type: SCHEMA_TYPES$1.ENUM,
|
|
1359
1359
|
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,
|
|
1360
|
+
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
1361
|
name: this.typeName,
|
|
1362
1362
|
description: this.schemaFormatters.formatDescription(this.schema.description),
|
|
1363
1363
|
content
|
|
@@ -4170,4 +4170,4 @@ Object.defineProperty(exports, "version", {
|
|
|
4170
4170
|
}
|
|
4171
4171
|
});
|
|
4172
4172
|
|
|
4173
|
-
//# sourceMappingURL=src-
|
|
4173
|
+
//# sourceMappingURL=src-t0Ockaa6.cjs.map
|