Skip to content

Commit

Permalink
chore: refresh test generated schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
js2me committed Apr 8, 2021
1 parent 25fbf67 commit 35b08b1
Show file tree
Hide file tree
Showing 59 changed files with 464 additions and 522 deletions.
17 changes: 8 additions & 9 deletions tests/generated/v2.0/adafruit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,23 +230,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
17 changes: 8 additions & 9 deletions tests/generated/v2.0/another-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,23 +206,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
17 changes: 8 additions & 9 deletions tests/generated/v2.0/another-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
17 changes: 8 additions & 9 deletions tests/generated/v2.0/api-with-examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
17 changes: 8 additions & 9 deletions tests/generated/v2.0/authentiq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
17 changes: 8 additions & 9 deletions tests/generated/v2.0/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,23 +140,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
17 changes: 8 additions & 9 deletions tests/generated/v2.0/example1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,23 +102,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
17 changes: 8 additions & 9 deletions tests/generated/v2.0/file-formdata-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
17 changes: 8 additions & 9 deletions tests/generated/v2.0/furkot-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
17 changes: 8 additions & 9 deletions tests/generated/v2.0/giphy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,23 +357,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
17 changes: 8 additions & 9 deletions tests/generated/v2.0/github-swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1510,23 +1510,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
17 changes: 8 additions & 9 deletions tests/generated/v2.0/path-args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,22 @@ export class HttpClient<SecurityDataType = unknown> {
this.securityData = data;
};

private addArrayQueryParam(query: QueryParamsType, key: string) {
private addQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
const encodedKey = encodeURIComponent(key);
return `${value
.map((val: any) => `${encodedKey}=${encodeURIComponent(typeof val === "number" ? val : `${val}`)}`)
.join("&")}`;
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
}

private addArrayQueryParam(query: QueryParamsType, key: string) {
const value = query[key];
return `${value.map(this.addQueryParam).join("&")}`;
}

protected toQueryString(rawQuery?: QueryParamsType): string {
const query = rawQuery || {};
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
return keys
.map((key) =>
typeof query[key] === "object" && !Array.isArray(query[key])
? this.toQueryString(query[key] as QueryParamsType)
: this.addArrayQueryParam(query, key),
)
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
.join("&");
}

Expand Down
Loading

0 comments on commit 35b08b1

Please sign in to comment.