Skip to content

Commit d7ae545

Browse files
committed
test: update snapshots to add json:api content type
1 parent feefce2 commit d7ae545

File tree

28 files changed

+538
-0
lines changed

28 files changed

+538
-0
lines changed

tests/__snapshots__/extended.test.ts.snap

Lines changed: 210 additions & 0 deletions
Large diffs are not rendered by default.

tests/__snapshots__/simple.test.ts.snap

Lines changed: 210 additions & 0 deletions
Large diffs are not rendered by default.

tests/spec/another-query-params/__snapshots__/basic.test.ts.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ type CancelToken = Symbol | string | number;
8787
8888
export enum ContentType {
8989
Json = "application/json",
90+
JsonApi = "application/vnd.api+json",
9091
FormData = "multipart/form-data",
9192
UrlEncoded = "application/x-www-form-urlencoded",
9293
Text = "text/plain",
@@ -153,6 +154,10 @@ export class HttpClient<SecurityDataType = unknown> {
153154
input !== null && (typeof input === "object" || typeof input === "string")
154155
? JSON.stringify(input)
155156
: input,
157+
[ContentType.JsonApi]: (input: any) =>
158+
input !== null && (typeof input === "object" || typeof input === "string")
159+
? JSON.stringify(input)
160+
: input,
156161
[ContentType.Text]: (input: any) =>
157162
input !== null && typeof input !== "string"
158163
? JSON.stringify(input)

tests/spec/axios/__snapshots__/basic.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,6 +1954,7 @@ export interface ApiConfig<SecurityDataType = unknown>
19541954

19551955
export enum ContentType {
19561956
Json = "application/json",
1957+
JsonApi = "application/vnd.api+json",
19571958
FormData = "multipart/form-data",
19581959
UrlEncoded = "application/x-www-form-urlencoded",
19591960
Text = "text/plain",

tests/spec/axiosSingleHttpClient/__snapshots__/basic.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,6 +1954,7 @@ export interface ApiConfig<SecurityDataType = unknown>
19541954

19551955
export enum ContentType {
19561956
Json = "application/json",
1957+
JsonApi = "application/vnd.api+json",
19571958
FormData = "multipart/form-data",
19581959
UrlEncoded = "application/x-www-form-urlencoded",
19591960
Text = "text/plain",

tests/spec/custom-extensions/__snapshots__/basic.test.ts.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ type CancelToken = Symbol | string | number;
5959
6060
export enum ContentType {
6161
Json = "application/json",
62+
JsonApi = "application/vnd.api+json",
6263
FormData = "multipart/form-data",
6364
UrlEncoded = "application/x-www-form-urlencoded",
6465
Text = "text/plain",
@@ -125,6 +126,10 @@ export class HttpClient<SecurityDataType = unknown> {
125126
input !== null && (typeof input === "object" || typeof input === "string")
126127
? JSON.stringify(input)
127128
: input,
129+
[ContentType.JsonApi]: (input: any) =>
130+
input !== null && (typeof input === "object" || typeof input === "string")
131+
? JSON.stringify(input)
132+
: input,
128133
[ContentType.Text]: (input: any) =>
129134
input !== null && typeof input !== "string"
130135
? JSON.stringify(input)

tests/spec/defaultAsSuccess/__snapshots__/basic.test.ts.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ type CancelToken = Symbol | string | number;
9999
100100
export enum ContentType {
101101
Json = "application/json",
102+
JsonApi = "application/vnd.api+json",
102103
FormData = "multipart/form-data",
103104
UrlEncoded = "application/x-www-form-urlencoded",
104105
Text = "text/plain",
@@ -165,6 +166,10 @@ export class HttpClient<SecurityDataType = unknown> {
165166
input !== null && (typeof input === "object" || typeof input === "string")
166167
? JSON.stringify(input)
167168
: input,
169+
[ContentType.JsonApi]: (input: any) =>
170+
input !== null && (typeof input === "object" || typeof input === "string")
171+
? JSON.stringify(input)
172+
: input,
168173
[ContentType.Text]: (input: any) =>
169174
input !== null && typeof input !== "string"
170175
? JSON.stringify(input)

tests/spec/defaultResponse/__snapshots__/basic.test.ts.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ type CancelToken = Symbol | string | number;
5959
6060
export enum ContentType {
6161
Json = "application/json",
62+
JsonApi = "application/vnd.api+json",
6263
FormData = "multipart/form-data",
6364
UrlEncoded = "application/x-www-form-urlencoded",
6465
Text = "text/plain",
@@ -125,6 +126,10 @@ export class HttpClient<SecurityDataType = unknown> {
125126
input !== null && (typeof input === "object" || typeof input === "string")
126127
? JSON.stringify(input)
127128
: input,
129+
[ContentType.JsonApi]: (input: any) =>
130+
input !== null && (typeof input === "object" || typeof input === "string")
131+
? JSON.stringify(input)
132+
: input,
128133
[ContentType.Text]: (input: any) =>
129134
input !== null && typeof input !== "string"
130135
? JSON.stringify(input)

tests/spec/deprecated/__snapshots__/basic.test.ts.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ type CancelToken = Symbol | string | number;
5959
6060
export enum ContentType {
6161
Json = "application/json",
62+
JsonApi = "application/vnd.api+json",
6263
FormData = "multipart/form-data",
6364
UrlEncoded = "application/x-www-form-urlencoded",
6465
Text = "text/plain",
@@ -125,6 +126,10 @@ export class HttpClient<SecurityDataType = unknown> {
125126
input !== null && (typeof input === "object" || typeof input === "string")
126127
? JSON.stringify(input)
127128
: input,
129+
[ContentType.JsonApi]: (input: any) =>
130+
input !== null && (typeof input === "object" || typeof input === "string")
131+
? JSON.stringify(input)
132+
: input,
128133
[ContentType.Text]: (input: any) =>
129134
input !== null && typeof input !== "string"
130135
? JSON.stringify(input)

tests/spec/dot-path-params/__snapshots__/basic.test.ts.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ type CancelToken = Symbol | string | number;
6161
6262
export enum ContentType {
6363
Json = "application/json",
64+
JsonApi = "application/vnd.api+json",
6465
FormData = "multipart/form-data",
6566
UrlEncoded = "application/x-www-form-urlencoded",
6667
Text = "text/plain",
@@ -127,6 +128,10 @@ export class HttpClient<SecurityDataType = unknown> {
127128
input !== null && (typeof input === "object" || typeof input === "string")
128129
? JSON.stringify(input)
129130
: input,
131+
[ContentType.JsonApi]: (input: any) =>
132+
input !== null && (typeof input === "object" || typeof input === "string")
133+
? JSON.stringify(input)
134+
: input,
130135
[ContentType.Text]: (input: any) =>
131136
input !== null && typeof input !== "string"
132137
? JSON.stringify(input)

0 commit comments

Comments
 (0)