Skip to content

Commit d9874b8

Browse files
author
Jochen Diekenbrock
committed
fix: update test files
1 parent a201e43 commit d9874b8

File tree

97 files changed

+233
-0
lines changed

Some content is hidden

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

97 files changed

+233
-0
lines changed

tests/generated/v2.0/adafruit.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ export enum ContentType {
208208
Json = "application/json",
209209
FormData = "multipart/form-data",
210210
UrlEncoded = "application/x-www-form-urlencoded",
211+
Text = "text/plain",
211212
}
212213

213214
export class HttpClient<SecurityDataType = unknown> {
@@ -262,6 +263,7 @@ export class HttpClient<SecurityDataType = unknown> {
262263
private contentFormatters: Record<ContentType, (input: any) => any> = {
263264
[ContentType.Json]: (input: any) =>
264265
input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
266+
[ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
265267
[ContentType.FormData]: (input: any) =>
266268
Object.keys(input || {}).reduce((formData, key) => {
267269
const property = input[key];

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ export enum ContentType {
174174
Json = "application/json",
175175
FormData = "multipart/form-data",
176176
UrlEncoded = "application/x-www-form-urlencoded",
177+
Text = "text/plain",
177178
}
178179

179180
export class HttpClient<SecurityDataType = unknown> {
@@ -228,6 +229,7 @@ export class HttpClient<SecurityDataType = unknown> {
228229
private contentFormatters: Record<ContentType, (input: any) => any> = {
229230
[ContentType.Json]: (input: any) =>
230231
input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
232+
[ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
231233
[ContentType.FormData]: (input: any) =>
232234
Object.keys(input || {}).reduce((formData, key) => {
233235
const property = input[key];

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export enum ContentType {
7272
Json = "application/json",
7373
FormData = "multipart/form-data",
7474
UrlEncoded = "application/x-www-form-urlencoded",
75+
Text = "text/plain",
7576
}
7677

7778
export class HttpClient<SecurityDataType = unknown> {
@@ -126,6 +127,7 @@ export class HttpClient<SecurityDataType = unknown> {
126127
private contentFormatters: Record<ContentType, (input: any) => any> = {
127128
[ContentType.Json]: (input: any) =>
128129
input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
130+
[ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
129131
[ContentType.FormData]: (input: any) =>
130132
Object.keys(input || {}).reduce((formData, key) => {
131133
const property = input[key];

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export enum ContentType {
5151
Json = "application/json",
5252
FormData = "multipart/form-data",
5353
UrlEncoded = "application/x-www-form-urlencoded",
54+
Text = "text/plain",
5455
}
5556

5657
export class HttpClient<SecurityDataType = unknown> {
@@ -105,6 +106,7 @@ export class HttpClient<SecurityDataType = unknown> {
105106
private contentFormatters: Record<ContentType, (input: any) => any> = {
106107
[ContentType.Json]: (input: any) =>
107108
input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
109+
[ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
108110
[ContentType.FormData]: (input: any) =>
109111
Object.keys(input || {}).reduce((formData, key) => {
110112
const property = input[key];
@@ -270,4 +272,21 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
270272
...params,
271273
}),
272274
};
275+
consumesPlainText = {
276+
/**
277+
* @description consumes plain text
278+
*
279+
* @name ConsumesPlainText
280+
* @summary consumes plain text
281+
* @request POST:/consumes-plain-text/
282+
*/
283+
consumesPlainText: (someParm: string, params: RequestParams = {}) =>
284+
this.request<any, void>({
285+
path: `/consumes-plain-text/`,
286+
method: "POST",
287+
body: someParm,
288+
type: ContentType.Text,
289+
...params,
290+
}),
291+
};
273292
}

tests/generated/v2.0/authentiq.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export enum ContentType {
9191
Json = "application/json",
9292
FormData = "multipart/form-data",
9393
UrlEncoded = "application/x-www-form-urlencoded",
94+
Text = "text/plain",
9495
}
9596

9697
export class HttpClient<SecurityDataType = unknown> {
@@ -145,6 +146,7 @@ export class HttpClient<SecurityDataType = unknown> {
145146
private contentFormatters: Record<ContentType, (input: any) => any> = {
146147
[ContentType.Json]: (input: any) =>
147148
input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
149+
[ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
148150
[ContentType.FormData]: (input: any) =>
149151
Object.keys(input || {}).reduce((formData, key) => {
150152
const property = input[key];

tests/generated/v2.0/enums.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export enum ContentType {
110110
Json = "application/json",
111111
FormData = "multipart/form-data",
112112
UrlEncoded = "application/x-www-form-urlencoded",
113+
Text = "text/plain",
113114
}
114115

115116
export class HttpClient<SecurityDataType = unknown> {
@@ -164,6 +165,7 @@ export class HttpClient<SecurityDataType = unknown> {
164165
private contentFormatters: Record<ContentType, (input: any) => any> = {
165166
[ContentType.Json]: (input: any) =>
166167
input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
168+
[ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
167169
[ContentType.FormData]: (input: any) =>
168170
Object.keys(input || {}).reduce((formData, key) => {
169171
const property = input[key];

tests/generated/v2.0/example1.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export enum ContentType {
8888
Json = "application/json",
8989
FormData = "multipart/form-data",
9090
UrlEncoded = "application/x-www-form-urlencoded",
91+
Text = "text/plain",
9192
}
9293

9394
export class HttpClient<SecurityDataType = unknown> {
@@ -142,6 +143,7 @@ export class HttpClient<SecurityDataType = unknown> {
142143
private contentFormatters: Record<ContentType, (input: any) => any> = {
143144
[ContentType.Json]: (input: any) =>
144145
input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
146+
[ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
145147
[ContentType.FormData]: (input: any) =>
146148
Object.keys(input || {}).reduce((formData, key) => {
147149
const property = input[key];

tests/generated/v2.0/file-formdata-example.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export enum ContentType {
5151
Json = "application/json",
5252
FormData = "multipart/form-data",
5353
UrlEncoded = "application/x-www-form-urlencoded",
54+
Text = "text/plain",
5455
}
5556

5657
export class HttpClient<SecurityDataType = unknown> {
@@ -105,6 +106,7 @@ export class HttpClient<SecurityDataType = unknown> {
105106
private contentFormatters: Record<ContentType, (input: any) => any> = {
106107
[ContentType.Json]: (input: any) =>
107108
input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
109+
[ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
108110
[ContentType.FormData]: (input: any) =>
109111
Object.keys(input || {}).reduce((formData, key) => {
110112
const property = input[key];

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export enum ContentType {
124124
Json = "application/json",
125125
FormData = "multipart/form-data",
126126
UrlEncoded = "application/x-www-form-urlencoded",
127+
Text = "text/plain",
127128
}
128129

129130
export class HttpClient<SecurityDataType = unknown> {
@@ -178,6 +179,7 @@ export class HttpClient<SecurityDataType = unknown> {
178179
private contentFormatters: Record<ContentType, (input: any) => any> = {
179180
[ContentType.Json]: (input: any) =>
180181
input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
182+
[ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
181183
[ContentType.FormData]: (input: any) =>
182184
Object.keys(input || {}).reduce((formData, key) => {
183185
const property = input[key];

tests/generated/v2.0/giphy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ export enum ContentType {
308308
Json = "application/json",
309309
FormData = "multipart/form-data",
310310
UrlEncoded = "application/x-www-form-urlencoded",
311+
Text = "text/plain",
311312
}
312313

313314
export class HttpClient<SecurityDataType = unknown> {
@@ -362,6 +363,7 @@ export class HttpClient<SecurityDataType = unknown> {
362363
private contentFormatters: Record<ContentType, (input: any) => any> = {
363364
[ContentType.Json]: (input: any) =>
364365
input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
366+
[ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
365367
[ContentType.FormData]: (input: any) =>
366368
Object.keys(input || {}).reduce((formData, key) => {
367369
const property = input[key];

0 commit comments

Comments
 (0)