File tree 28 files changed +538
-0
lines changed
another-query-params/__snapshots__
axiosSingleHttpClient/__snapshots__
custom-extensions/__snapshots__
defaultAsSuccess/__snapshots__
defaultResponse/__snapshots__
dot-path-params/__snapshots__
enumNamesAsValues/__snapshots__
enumNotFirstInComponents/__snapshots__
extractRequestBody/__snapshots__
extractResponseBody/__snapshots__
moduleNameFirstTag/__snapshots__
moduleNameIndex/__snapshots__
on-insert-path-param/__snapshots__
singleHttpClient/__snapshots__
sortTypes-false/__snapshots__
typeSuffixPrefix/__snapshots__
28 files changed +538
-0
lines changed Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ type CancelToken = Symbol | string | number;
87
87
88
88
export enum ContentType {
89
89
Json = " application/json" ,
90
+ JsonApi = " application/vnd.api+json" ,
90
91
FormData = " multipart/form-data" ,
91
92
UrlEncoded = " application/x-www-form-urlencoded" ,
92
93
Text = " text/plain" ,
@@ -153,6 +154,10 @@ export class HttpClient<SecurityDataType = unknown> {
153
154
input !== null && (typeof input === " object" || typeof input === " string" )
154
155
? JSON .stringify (input )
155
156
: input ,
157
+ [ContentType .JsonApi ]: (input : any ) =>
158
+ input !== null && (typeof input === " object" || typeof input === " string" )
159
+ ? JSON .stringify (input )
160
+ : input ,
156
161
[ContentType .Text ]: (input : any ) =>
157
162
input !== null && typeof input !== " string"
158
163
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -1954,6 +1954,7 @@ export interface ApiConfig<SecurityDataType = unknown>
1954
1954
1955
1955
export enum ContentType {
1956
1956
Json = "application/json",
1957
+ JsonApi = "application/vnd.api+json",
1957
1958
FormData = "multipart/form-data",
1958
1959
UrlEncoded = "application/x-www-form-urlencoded",
1959
1960
Text = "text/plain",
Original file line number Diff line number Diff line change @@ -1954,6 +1954,7 @@ export interface ApiConfig<SecurityDataType = unknown>
1954
1954
1955
1955
export enum ContentType {
1956
1956
Json = "application/json",
1957
+ JsonApi = "application/vnd.api+json",
1957
1958
FormData = "multipart/form-data",
1958
1959
UrlEncoded = "application/x-www-form-urlencoded",
1959
1960
Text = "text/plain",
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ type CancelToken = Symbol | string | number;
59
59
60
60
export enum ContentType {
61
61
Json = " application/json" ,
62
+ JsonApi = " application/vnd.api+json" ,
62
63
FormData = " multipart/form-data" ,
63
64
UrlEncoded = " application/x-www-form-urlencoded" ,
64
65
Text = " text/plain" ,
@@ -125,6 +126,10 @@ export class HttpClient<SecurityDataType = unknown> {
125
126
input !== null && (typeof input === " object" || typeof input === " string" )
126
127
? JSON .stringify (input )
127
128
: input ,
129
+ [ContentType .JsonApi ]: (input : any ) =>
130
+ input !== null && (typeof input === " object" || typeof input === " string" )
131
+ ? JSON .stringify (input )
132
+ : input ,
128
133
[ContentType .Text ]: (input : any ) =>
129
134
input !== null && typeof input !== " string"
130
135
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ type CancelToken = Symbol | string | number;
99
99
100
100
export enum ContentType {
101
101
Json = " application/json" ,
102
+ JsonApi = " application/vnd.api+json" ,
102
103
FormData = " multipart/form-data" ,
103
104
UrlEncoded = " application/x-www-form-urlencoded" ,
104
105
Text = " text/plain" ,
@@ -165,6 +166,10 @@ export class HttpClient<SecurityDataType = unknown> {
165
166
input !== null && (typeof input === " object" || typeof input === " string" )
166
167
? JSON .stringify (input )
167
168
: input ,
169
+ [ContentType .JsonApi ]: (input : any ) =>
170
+ input !== null && (typeof input === " object" || typeof input === " string" )
171
+ ? JSON .stringify (input )
172
+ : input ,
168
173
[ContentType .Text ]: (input : any ) =>
169
174
input !== null && typeof input !== " string"
170
175
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ type CancelToken = Symbol | string | number;
59
59
60
60
export enum ContentType {
61
61
Json = " application/json" ,
62
+ JsonApi = " application/vnd.api+json" ,
62
63
FormData = " multipart/form-data" ,
63
64
UrlEncoded = " application/x-www-form-urlencoded" ,
64
65
Text = " text/plain" ,
@@ -125,6 +126,10 @@ export class HttpClient<SecurityDataType = unknown> {
125
126
input !== null && (typeof input === " object" || typeof input === " string" )
126
127
? JSON .stringify (input )
127
128
: input ,
129
+ [ContentType .JsonApi ]: (input : any ) =>
130
+ input !== null && (typeof input === " object" || typeof input === " string" )
131
+ ? JSON .stringify (input )
132
+ : input ,
128
133
[ContentType .Text ]: (input : any ) =>
129
134
input !== null && typeof input !== " string"
130
135
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ type CancelToken = Symbol | string | number;
59
59
60
60
export enum ContentType {
61
61
Json = " application/json" ,
62
+ JsonApi = " application/vnd.api+json" ,
62
63
FormData = " multipart/form-data" ,
63
64
UrlEncoded = " application/x-www-form-urlencoded" ,
64
65
Text = " text/plain" ,
@@ -125,6 +126,10 @@ export class HttpClient<SecurityDataType = unknown> {
125
126
input !== null && (typeof input === " object" || typeof input === " string" )
126
127
? JSON .stringify (input )
127
128
: input ,
129
+ [ContentType .JsonApi ]: (input : any ) =>
130
+ input !== null && (typeof input === " object" || typeof input === " string" )
131
+ ? JSON .stringify (input )
132
+ : input ,
128
133
[ContentType .Text ]: (input : any ) =>
129
134
input !== null && typeof input !== " string"
130
135
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ type CancelToken = Symbol | string | number;
61
61
62
62
export enum ContentType {
63
63
Json = " application/json" ,
64
+ JsonApi = " application/vnd.api+json" ,
64
65
FormData = " multipart/form-data" ,
65
66
UrlEncoded = " application/x-www-form-urlencoded" ,
66
67
Text = " text/plain" ,
@@ -127,6 +128,10 @@ export class HttpClient<SecurityDataType = unknown> {
127
128
input !== null && (typeof input === " object" || typeof input === " string" )
128
129
? JSON .stringify (input )
129
130
: input ,
131
+ [ContentType .JsonApi ]: (input : any ) =>
132
+ input !== null && (typeof input === " object" || typeof input === " string" )
133
+ ? JSON .stringify (input )
134
+ : input ,
130
135
[ContentType .Text ]: (input : any ) =>
131
136
input !== null && typeof input !== " string"
132
137
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -251,6 +251,7 @@ type CancelToken = Symbol | string | number;
251
251
252
252
export enum ContentType {
253
253
Json = " application/json" ,
254
+ JsonApi = " application/vnd.api+json" ,
254
255
FormData = " multipart/form-data" ,
255
256
UrlEncoded = " application/x-www-form-urlencoded" ,
256
257
Text = " text/plain" ,
@@ -317,6 +318,10 @@ export class HttpClient<SecurityDataType = unknown> {
317
318
input !== null && (typeof input === " object" || typeof input === " string" )
318
319
? JSON .stringify (input )
319
320
: input ,
321
+ [ContentType .JsonApi ]: (input : any ) =>
322
+ input !== null && (typeof input === " object" || typeof input === " string" )
323
+ ? JSON .stringify (input )
324
+ : input ,
320
325
[ContentType .Text ]: (input : any ) =>
321
326
input !== null && typeof input !== " string"
322
327
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ type CancelToken = Symbol | string | number;
89
89
90
90
export enum ContentType {
91
91
Json = " application/json" ,
92
+ JsonApi = " application/vnd.api+json" ,
92
93
FormData = " multipart/form-data" ,
93
94
UrlEncoded = " application/x-www-form-urlencoded" ,
94
95
Text = " text/plain" ,
@@ -155,6 +156,10 @@ export class HttpClient<SecurityDataType = unknown> {
155
156
input !== null && (typeof input === " object" || typeof input === " string" )
156
157
? JSON .stringify (input )
157
158
: input ,
159
+ [ContentType .JsonApi ]: (input : any ) =>
160
+ input !== null && (typeof input === " object" || typeof input === " string" )
161
+ ? JSON .stringify (input )
162
+ : input ,
158
163
[ContentType .Text ]: (input : any ) =>
159
164
input !== null && typeof input !== " string"
160
165
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ type CancelToken = Symbol | string | number;
228
228
229
229
export enum ContentType {
230
230
Json = " application/json" ,
231
+ JsonApi = " application/vnd.api+json" ,
231
232
FormData = " multipart/form-data" ,
232
233
UrlEncoded = " application/x-www-form-urlencoded" ,
233
234
Text = " text/plain" ,
@@ -294,6 +295,10 @@ export class HttpClient<SecurityDataType = unknown> {
294
295
input !== null && (typeof input === " object" || typeof input === " string" )
295
296
? JSON .stringify (input )
296
297
: input ,
298
+ [ContentType .JsonApi ]: (input : any ) =>
299
+ input !== null && (typeof input === " object" || typeof input === " string" )
300
+ ? JSON .stringify (input )
301
+ : input ,
297
302
[ContentType .Text ]: (input : any ) =>
298
303
input !== null && typeof input !== " string"
299
304
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ type CancelToken = Symbol | string | number;
134
134
135
135
export enum ContentType {
136
136
Json = " application/json" ,
137
+ JsonApi = " application/vnd.api+json" ,
137
138
FormData = " multipart/form-data" ,
138
139
UrlEncoded = " application/x-www-form-urlencoded" ,
139
140
Text = " text/plain" ,
@@ -200,6 +201,10 @@ export class HttpClient<SecurityDataType = unknown> {
200
201
input !== null && (typeof input === " object" || typeof input === " string" )
201
202
? JSON .stringify (input )
202
203
: input ,
204
+ [ContentType .JsonApi ]: (input : any ) =>
205
+ input !== null && (typeof input === " object" || typeof input === " string" )
206
+ ? JSON .stringify (input )
207
+ : input ,
203
208
[ContentType .Text ]: (input : any ) =>
204
209
input !== null && typeof input !== " string"
205
210
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ type CancelToken = Symbol | string | number;
214
214
215
215
export enum ContentType {
216
216
Json = " application/json" ,
217
+ JsonApi = " application/vnd.api+json" ,
217
218
FormData = " multipart/form-data" ,
218
219
UrlEncoded = " application/x-www-form-urlencoded" ,
219
220
Text = " text/plain" ,
@@ -280,6 +281,10 @@ export class HttpClient<SecurityDataType = unknown> {
280
281
input !== null && (typeof input === " object" || typeof input === " string" )
281
282
? JSON .stringify (input )
282
283
: input ,
284
+ [ContentType .JsonApi ]: (input : any ) =>
285
+ input !== null && (typeof input === " object" || typeof input === " string" )
286
+ ? JSON .stringify (input )
287
+ : input ,
283
288
[ContentType .Text ]: (input : any ) =>
284
289
input !== null && typeof input !== " string"
285
290
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -209,6 +209,7 @@ type CancelToken = Symbol | string | number;
209
209
210
210
export enum ContentType {
211
211
Json = " application/json" ,
212
+ JsonApi = " application/vnd.api+json" ,
212
213
FormData = " multipart/form-data" ,
213
214
UrlEncoded = " application/x-www-form-urlencoded" ,
214
215
Text = " text/plain" ,
@@ -275,6 +276,10 @@ export class HttpClient<SecurityDataType = unknown> {
275
276
input !== null && (typeof input === " object" || typeof input === " string" )
276
277
? JSON .stringify (input )
277
278
: input ,
279
+ [ContentType .JsonApi ]: (input : any ) =>
280
+ input !== null && (typeof input === " object" || typeof input === " string" )
281
+ ? JSON .stringify (input )
282
+ : input ,
278
283
[ContentType .Text ]: (input : any ) =>
279
284
input !== null && typeof input !== " string"
280
285
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import axios from "axios";
17
17
export var ContentType;
18
18
(function (ContentType) {
19
19
ContentType["Json"] = "application/json";
20
+ ContentType["JsonApi"] = "application/vnd.api+json";
20
21
ContentType["FormData"] = "multipart/form-data";
21
22
ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
22
23
ContentType["Text"] = "text/plain";
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ exports[`basic > --js 1`] = `
16
16
export var ContentType;
17
17
(function (ContentType) {
18
18
ContentType["Json"] = "application/json";
19
+ ContentType["JsonApi"] = "application/vnd.api+json";
19
20
ContentType["FormData"] = "multipart/form-data";
20
21
ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
21
22
ContentType["Text"] = "text/plain";
@@ -71,6 +72,10 @@ export class HttpClient {
71
72
input !== null && (typeof input === "object" || typeof input === "string")
72
73
? JSON.stringify(input)
73
74
: input,
75
+ [ContentType.JsonApi]: (input) =>
76
+ input !== null && (typeof input === "object" || typeof input === "string")
77
+ ? JSON.stringify(input)
78
+ : input,
74
79
[ContentType.Text]: (input) =>
75
80
input !== null && typeof input !== "string"
76
81
? JSON.stringify(input)
Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ type CancelToken = Symbol | string | number;
184
184
185
185
export enum ContentType {
186
186
Json = " application/json" ,
187
+ JsonApi = " application/vnd.api+json" ,
187
188
FormData = " multipart/form-data" ,
188
189
UrlEncoded = " application/x-www-form-urlencoded" ,
189
190
Text = " text/plain" ,
@@ -250,6 +251,10 @@ export class HttpClient<SecurityDataType = unknown> {
250
251
input !== null && (typeof input === " object" || typeof input === " string" )
251
252
? JSON .stringify (input )
252
253
: input ,
254
+ [ContentType .JsonApi ]: (input : any ) =>
255
+ input !== null && (typeof input === " object" || typeof input === " string" )
256
+ ? JSON .stringify (input )
257
+ : input ,
253
258
[ContentType .Text ]: (input : any ) =>
254
259
input !== null && typeof input !== " string"
255
260
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ type CancelToken = Symbol | string | number;
184
184
185
185
export enum ContentType {
186
186
Json = " application/json" ,
187
+ JsonApi = " application/vnd.api+json" ,
187
188
FormData = " multipart/form-data" ,
188
189
UrlEncoded = " application/x-www-form-urlencoded" ,
189
190
Text = " text/plain" ,
@@ -250,6 +251,10 @@ export class HttpClient<SecurityDataType = unknown> {
250
251
input !== null && (typeof input === " object" || typeof input === " string" )
251
252
? JSON .stringify (input )
252
253
: input ,
254
+ [ContentType .JsonApi ]: (input : any ) =>
255
+ input !== null && (typeof input === " object" || typeof input === " string" )
256
+ ? JSON .stringify (input )
257
+ : input ,
253
258
[ContentType .Text ]: (input : any ) =>
254
259
input !== null && typeof input !== " string"
255
260
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ type CancelToken = Symbol | string | number;
59
59
60
60
export enum ContentType {
61
61
Json = " application/json" ,
62
+ JsonApi = " application/vnd.api+json" ,
62
63
FormData = " multipart/form-data" ,
63
64
UrlEncoded = " application/x-www-form-urlencoded" ,
64
65
Text = " text/plain" ,
@@ -125,6 +126,10 @@ export class HttpClient<SecurityDataType = unknown> {
125
126
input !== null && (typeof input === " object" || typeof input === " string" )
126
127
? JSON .stringify (input )
127
128
: input ,
129
+ [ContentType .JsonApi ]: (input : any ) =>
130
+ input !== null && (typeof input === " object" || typeof input === " string" )
131
+ ? JSON .stringify (input )
132
+ : input ,
128
133
[ContentType .Text ]: (input : any ) =>
129
134
input !== null && typeof input !== " string"
130
135
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -1816,6 +1816,7 @@ type CancelToken = Symbol | string | number;
1816
1816
1817
1817
export enum ContentType {
1818
1818
Json = "application/json",
1819
+ JsonApi = "application/vnd.api+json",
1819
1820
FormData = "multipart/form-data",
1820
1821
UrlEncoded = "application/x-www-form-urlencoded",
1821
1822
Text = "text/plain",
@@ -1882,6 +1883,10 @@ export class HttpClient<SecurityDataType = unknown> {
1882
1883
input !== null && (typeof input === "object" || typeof input === "string")
1883
1884
? JSON.stringify(input)
1884
1885
: input,
1886
+ [ContentType.JsonApi]: (input: any) =>
1887
+ input !== null && (typeof input === "object" || typeof input === "string")
1888
+ ? JSON.stringify(input)
1889
+ : input,
1885
1890
[ContentType.Text]: (input: any) =>
1886
1891
input !== null && typeof input !== "string"
1887
1892
? JSON.stringify(input)
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ type CancelToken = Symbol | string | number;
99
99
100
100
export enum ContentType {
101
101
Json = " application/json" ,
102
+ JsonApi = " application/vnd.api+json" ,
102
103
FormData = " multipart/form-data" ,
103
104
UrlEncoded = " application/x-www-form-urlencoded" ,
104
105
Text = " text/plain" ,
@@ -165,6 +166,10 @@ export class HttpClient<SecurityDataType = unknown> {
165
166
input !== null && (typeof input === " object" || typeof input === " string" )
166
167
? JSON .stringify (input )
167
168
: input ,
169
+ [ContentType .JsonApi ]: (input : any ) =>
170
+ input !== null && (typeof input === " object" || typeof input === " string" )
171
+ ? JSON .stringify (input )
172
+ : input ,
168
173
[ContentType .Text ]: (input : any ) =>
169
174
input !== null && typeof input !== " string"
170
175
? JSON .stringify (input )
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ type CancelToken = Symbol | string | number;
59
59
60
60
export enum ContentType {
61
61
Json = " application/json" ,
62
+ JsonApi = " application/vnd.api+json" ,
62
63
FormData = " multipart/form-data" ,
63
64
UrlEncoded = " application/x-www-form-urlencoded" ,
64
65
Text = " text/plain" ,
@@ -125,6 +126,10 @@ export class HttpClient<SecurityDataType = unknown> {
125
126
input !== null && (typeof input === " object" || typeof input === " string" )
126
127
? JSON .stringify (input )
127
128
: input ,
129
+ [ContentType .JsonApi ]: (input : any ) =>
130
+ input !== null && (typeof input === " object" || typeof input === " string" )
131
+ ? JSON .stringify (input )
132
+ : input ,
128
133
[ContentType .Text ]: (input : any ) =>
129
134
input !== null && typeof input !== " string"
130
135
? JSON .stringify (input )
You can’t perform that action at this time.
0 commit comments