Skip to content

Commit 31e63c2

Browse files
authored
Release 8.0.2 (#225)
* bump: up version to 8.0.2; fix: `format` option in `fetch` http client
1 parent b226db3 commit 31e63c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+65
-60
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# next release
22

3+
# 8.0.2
4+
5+
Fixes:
6+
- Wrong working the `format` option in `fetch` http client
7+
38
# 8.0.1
49

510
Fixes:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "swagger-typescript-api",
3-
"version": "8.0.1",
3+
"version": "8.0.2",
44
"description": "Generate typescript/javascript api from swagger schema",
55
"scripts": {
66
"cli:json": "node index.js -r -d -p ./swagger-test-cli.json -n swagger-test-cli.ts",

templates/base/http-clients/fetch-http-client.eta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export class HttpClient<SecurityDataType = unknown> {
153153
const requestParams = this.mergeRequestParams(params, secureParams);
154154
const queryString = query && this.toQueryString(query);
155155
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
156-
const responseFormat = format && requestParams.format;
156+
const responseFormat = format || requestParams.format;
157157

158158
return this.customFetch(
159159
`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,

tests/generated/v2.0/adafruit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export class HttpClient<SecurityDataType = unknown> {
321321
const requestParams = this.mergeRequestParams(params, secureParams);
322322
const queryString = query && this.toQueryString(query);
323323
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
324-
const responseFormat = format && requestParams.format;
324+
const responseFormat = format || requestParams.format;
325325

326326
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
327327
...requestParams,

tests/generated/v2.0/another-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ export class HttpClient<SecurityDataType = unknown> {
297297
const requestParams = this.mergeRequestParams(params, secureParams);
298298
const queryString = query && this.toQueryString(query);
299299
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
300-
const responseFormat = format && requestParams.format;
300+
const responseFormat = format || requestParams.format;
301301

302302
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
303303
...requestParams,

tests/generated/v2.0/another-schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export class HttpClient<SecurityDataType = unknown> {
189189
const requestParams = this.mergeRequestParams(params, secureParams);
190190
const queryString = query && this.toQueryString(query);
191191
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
192-
const responseFormat = format && requestParams.format;
192+
const responseFormat = format || requestParams.format;
193193

194194
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
195195
...requestParams,

tests/generated/v2.0/api-with-examples.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export class HttpClient<SecurityDataType = unknown> {
166166
const requestParams = this.mergeRequestParams(params, secureParams);
167167
const queryString = query && this.toQueryString(query);
168168
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
169-
const responseFormat = format && requestParams.format;
169+
const responseFormat = format || requestParams.format;
170170

171171
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
172172
...requestParams,

tests/generated/v2.0/authentiq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export class HttpClient<SecurityDataType = unknown> {
218218
const requestParams = this.mergeRequestParams(params, secureParams);
219219
const queryString = query && this.toQueryString(query);
220220
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
221-
const responseFormat = format && requestParams.format;
221+
const responseFormat = format || requestParams.format;
222222

223223
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
224224
...requestParams,

tests/generated/v2.0/enums.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export class HttpClient<SecurityDataType = unknown> {
231231
const requestParams = this.mergeRequestParams(params, secureParams);
232232
const queryString = query && this.toQueryString(query);
233233
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
234-
const responseFormat = format && requestParams.format;
234+
const responseFormat = format || requestParams.format;
235235

236236
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
237237
...requestParams,

tests/generated/v2.0/example1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export class HttpClient<SecurityDataType = unknown> {
193193
const requestParams = this.mergeRequestParams(params, secureParams);
194194
const queryString = query && this.toQueryString(query);
195195
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
196-
const responseFormat = format && requestParams.format;
196+
const responseFormat = format || requestParams.format;
197197

198198
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
199199
...requestParams,

0 commit comments

Comments
 (0)