swagger-typescript-api 13.6.1 → 13.6.2
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/README.md +2 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-BPSpx7Sf.mjs → src-BQOg3KNL.mjs} +6 -3
- package/dist/src-BQOg3KNL.mjs.map +1 -0
- package/dist/{src-DEFrSruL.cjs → src-CxPRLeDh.cjs} +6 -3
- package/dist/src-CxPRLeDh.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/src-BPSpx7Sf.mjs.map +0 -1
- package/dist/src-DEFrSruL.cjs.map +0 -1
|
@@ -213,7 +213,7 @@ var ComponentTypeNameResolver = class extends NameResolver {
|
|
|
213
213
|
//#endregion
|
|
214
214
|
//#region package.json
|
|
215
215
|
var name = "swagger-typescript-api";
|
|
216
|
-
var version = "13.6.
|
|
216
|
+
var version = "13.6.2";
|
|
217
217
|
var description = "Generate the API client for Fetch or Axios from an OpenAPI Specification";
|
|
218
218
|
//#endregion
|
|
219
219
|
//#region src/constants.ts
|
|
@@ -1951,13 +1951,16 @@ var SchemaRoutes = class {
|
|
|
1951
1951
|
return `headers: { ${Object.entries(headerTypes).map(([k, v]) => `"${k}": ${v}`).join(",")} },`;
|
|
1952
1952
|
};
|
|
1953
1953
|
const typesToCheck = (Array.isArray(originalProduces) && originalProduces.length > 0 ? originalProduces : null) ?? (produces?.length ? produces : null) ?? (successContentTypes?.length ? successContentTypes : null) ?? contentTypes;
|
|
1954
|
+
const isBinarySuccessType = this.isBinaryOnlyContentTypes(typesToCheck);
|
|
1954
1955
|
return {
|
|
1955
1956
|
contentTypes,
|
|
1956
1957
|
responses: responseInfos,
|
|
1957
1958
|
links,
|
|
1959
|
+
typesToCheck,
|
|
1958
1960
|
success: {
|
|
1961
|
+
isBinary: isBinarySuccessType,
|
|
1959
1962
|
schema: successResponse,
|
|
1960
|
-
type:
|
|
1963
|
+
type: isBinarySuccessType ? this.config.Ts.Keyword.Blob : successResponse?.type || this.config.Ts.Keyword.Any
|
|
1961
1964
|
},
|
|
1962
1965
|
error: {
|
|
1963
1966
|
schemas: errorResponses,
|
|
@@ -3578,4 +3581,4 @@ Object.defineProperty(exports, "version", {
|
|
|
3578
3581
|
}
|
|
3579
3582
|
});
|
|
3580
3583
|
|
|
3581
|
-
//# sourceMappingURL=src-
|
|
3584
|
+
//# sourceMappingURL=src-CxPRLeDh.cjs.map
|