Commit 7df956c
Release 9.2.0 (#278)
* added --unwrap-response-data to unwrap the data item from the response (#268)
* added --unwrap-response-data to unwrap the data item from the response
* add axios --unwrap-response-data
Co-authored-by: Christian Zangl <[email protected]>
* fix: formdata in axios template (#277)
Co-authored-by: Tiago Kaneta <[email protected]>
* Feature: add full response typing for status code, data and headers. (#272)
This commit adds additional type information to the route's response
object that allows types to be created that express the combination
of status code, data and headers for each response.
This type information can be used to "narrow" a response type based on
an HTTP status code. This narrowing is useful since it can prevent type
mismatches where a status code is presumed to have one type but in actuality
it returns another.
Additionally, response headers are now associated with data types and status
codes rather than being free form.
A caveat right now is that only there are no response codes like 3XX or
5XX, every code must be explicitly listed.
* bump: up version to 9.2.0
Co-authored-by: Christian Zangl <[email protected]>
Co-authored-by: Christian Zangl <[email protected]>
Co-authored-by: Tiago Surjus Kaneta <[email protected]>
Co-authored-by: Tiago Kaneta <[email protected]>
Co-authored-by: Rusty Conover <[email protected]>1 parent 189dec0 commit 7df956c
File tree
12 files changed
+69
-8
lines changed- src
- templates/base/http-clients
- tests/spec
- axiosSingleHttpClient
- axios
- jsAxios
12 files changed
+69
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
3 | 12 | | |
4 | 13 | | |
5 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
475 | 476 | | |
476 | 477 | | |
477 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
478 | 494 | | |
479 | 495 | | |
480 | 496 | | |
| |||
486 | 502 | | |
487 | 503 | | |
488 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
489 | 518 | | |
490 | 519 | | |
491 | 520 | | |
| |||
685 | 714 | | |
686 | 715 | | |
687 | 716 | | |
| 717 | + | |
688 | 718 | | |
689 | 719 | | |
690 | 720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
92 | 95 | | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| |||
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
102 | | - | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
115 | 122 | | |
| 123 | + | |
116 | 124 | | |
117 | 125 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
167 | 170 | | |
| 171 | + | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
206 | 210 | | |
207 | 211 | | |
208 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
209 | 216 | | |
| 217 | + | |
210 | 218 | | |
211 | 219 | | |
212 | 220 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1547 | 1547 | | |
1548 | 1548 | | |
1549 | 1549 | | |
1550 | | - | |
| 1550 | + | |
1551 | 1551 | | |
1552 | 1552 | | |
1553 | 1553 | | |
| |||
0 commit comments