Skip to content

Commit 8354a4f

Browse files
js2memutoe
andauthored
Release 6.4.1 (bugfix) (#204)
* fix(template): axios merge request headers issue (#202) * bump: up version to 6.4.1 Co-authored-by: Dongsen <[email protected]>
1 parent d86aca2 commit 8354a4f

File tree

7 files changed

+9
-6
lines changed

7 files changed

+9
-6
lines changed

CHANGELOG.md

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

3+
# 6.4.1
34

5+
Fixes:
6+
- Bug with axios headers (thanks @mutoe)
47

58
# 6.4.0
69

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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": "6.4.0",
3+
"version": "6.4.1",
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/axios-http-client.eta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class HttpClient<SecurityDataType = unknown> {
5353
...params1,
5454
...(params2 || {}),
5555
headers: {
56-
...this.instance.defaults,
56+
...(this.instance.defaults.headers || {}),
5757
...(params1.headers || {}),
5858
...((params2 && params2.headers) || {}),
5959
},

tests/spec/axios/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ export class HttpClient<SecurityDataType = unknown> {
14971497
...params1,
14981498
...(params2 || {}),
14991499
headers: {
1500-
...this.instance.defaults,
1500+
...(this.instance.defaults.headers || {}),
15011501
...(params1.headers || {}),
15021502
...((params2 && params2.headers) || {}),
15031503
},

tests/spec/axiosSingleHttpClient/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ export class HttpClient<SecurityDataType = unknown> {
14971497
...params1,
14981498
...(params2 || {}),
14991499
headers: {
1500-
...this.instance.defaults,
1500+
...(this.instance.defaults.headers || {}),
15011501
...(params1.headers || {}),
15021502
...((params2 && params2.headers) || {}),
15031503
},

tests/spec/jsAxios/schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class HttpClient {
4646
...params1,
4747
...(params2 || {}),
4848
headers: {
49-
...this.instance.defaults,
49+
...(this.instance.defaults.headers || {}),
5050
...(params1.headers || {}),
5151
...((params2 && params2.headers) || {}),
5252
},

0 commit comments

Comments
 (0)