Skip to content

Commit

Permalink
[typescript-fetch] Fix double comma arguments due to initOverrides. R…
Browse files Browse the repository at this point in the history
…efs #10050 (#10101)
  • Loading branch information
badsyntax authored Aug 6, 2021
1 parent 39901c8 commit 6d8791c
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export interface {{classname}}Interface {
{{/summary}}
*/
{{^useSingleRequestParameter}}
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}{{^-last}}, {{/-last}}, {{/allParams}}initOverrides?: RequestInit): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>;
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}initOverrides?: RequestInit): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>;
{{/useSingleRequestParameter}}
{{#useSingleRequestParameter}}
{{nickname}}({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>;
Expand Down Expand Up @@ -331,7 +331,7 @@ export class {{classname}} extends runtime.BaseAPI {
{{/summary}}
*/
{{^useSingleRequestParameter}}
async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}{{^-last}}, {{/-last}}, {{/allParams}}initOverrides?: RequestInit): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}initOverrides?: RequestInit): Promise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
{{#returnType}}
const response = await this.{{nickname}}Raw({{#allParams.0}}{ {{#allParams}}{{paramName}}: {{paramName}}{{^-last}}, {{/-last}}{{/allParams}} }, {{/allParams.0}}initOverrides);
return await response.value();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class PetApi extends runtime.BaseAPI {
/**
* Deletes a pet
*/
async deletePet(petId: number, , apiKey?: string, initOverrides?: RequestInit): Promise<void> {
async deletePet(petId: number, apiKey?: string, initOverrides?: RequestInit): Promise<void> {
await this.deletePetRaw({ petId: petId, apiKey: apiKey }, initOverrides);
}

Expand Down Expand Up @@ -348,7 +348,7 @@ export class PetApi extends runtime.BaseAPI {
/**
* Updates a pet in the store with form data
*/
async updatePetWithForm(petId: number, , name?: string, , status?: string, initOverrides?: RequestInit): Promise<void> {
async updatePetWithForm(petId: number, name?: string, status?: string, initOverrides?: RequestInit): Promise<void> {
await this.updatePetWithFormRaw({ petId: petId, name: name, status: status }, initOverrides);
}

Expand Down Expand Up @@ -407,7 +407,7 @@ export class PetApi extends runtime.BaseAPI {
/**
* uploads an image
*/
async uploadFile(petId: number, , additionalMetadata?: string, , file?: Blob, initOverrides?: RequestInit): Promise<ModelApiResponse> {
async uploadFile(petId: number, additionalMetadata?: string, file?: Blob, initOverrides?: RequestInit): Promise<ModelApiResponse> {
const response = await this.uploadFileRaw({ petId: petId, additionalMetadata: additionalMetadata, file: file }, initOverrides);
return await response.value();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export class UserApi extends runtime.BaseAPI {
/**
* Logs user into the system
*/
async loginUser(username: string, , password: string, initOverrides?: RequestInit): Promise<string> {
async loginUser(username: string, password: string, initOverrides?: RequestInit): Promise<string> {
const response = await this.loginUserRaw({ username: username, password: password }, initOverrides);
return await response.value();
}
Expand Down Expand Up @@ -315,7 +315,7 @@ export class UserApi extends runtime.BaseAPI {
* This can only be done by the logged in user.
* Updated user
*/
async updateUser(username: string, , body: User, initOverrides?: RequestInit): Promise<void> {
async updateUser(username: string, body: User, initOverrides?: RequestInit): Promise<void> {
await this.updateUserRaw({ username: username, body: body }, initOverrides);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class PetApi extends runtime.BaseAPI {
/**
* Deletes a pet
*/
async deletePet(petId: number, , apiKey?: string, initOverrides?: RequestInit): Promise<void> {
async deletePet(petId: number, apiKey?: string, initOverrides?: RequestInit): Promise<void> {
await this.deletePetRaw({ petId: petId, apiKey: apiKey }, initOverrides);
}

Expand Down Expand Up @@ -447,7 +447,7 @@ export class PetApi extends runtime.BaseAPI {
/**
* Updates a pet in the store with form data
*/
async updatePetWithForm(petId: number, , name?: string, , status?: string, initOverrides?: RequestInit): Promise<void> {
async updatePetWithForm(petId: number, name?: string, status?: string, initOverrides?: RequestInit): Promise<void> {
await this.updatePetWithFormRaw({ petId: petId, name: name, status: status }, initOverrides);
}

Expand Down Expand Up @@ -506,7 +506,7 @@ export class PetApi extends runtime.BaseAPI {
/**
* uploads an image
*/
async uploadFile(petId: number, , additionalMetadata?: string, , file?: Blob, initOverrides?: RequestInit): Promise<ModelApiResponse> {
async uploadFile(petId: number, additionalMetadata?: string, file?: Blob, initOverrides?: RequestInit): Promise<ModelApiResponse> {
const response = await this.uploadFileRaw({ petId: petId, additionalMetadata: additionalMetadata, file: file }, initOverrides);
return await response.value();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class PetPartApi extends runtime.BaseAPI {
/**
* Get the matching parts for the given pet part.
*/
async getMatchingParts(fakePetPartId: number, , _long: boolean, , smooth: boolean, , _short: boolean, , name?: string, , connectedPart?: string, initOverrides?: RequestInit): Promise<GetMatchingPartsResponse> {
async getMatchingParts(fakePetPartId: number, _long: boolean, smooth: boolean, _short: boolean, name?: string, connectedPart?: string, initOverrides?: RequestInit): Promise<GetMatchingPartsResponse> {
const response = await this.getMatchingPartsRaw({ fakePetPartId: fakePetPartId, _long: _long, smooth: smooth, _short: _short, name: name, connectedPart: connectedPart }, initOverrides);
return await response.value();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export class UserApi extends runtime.BaseAPI {
/**
* Logs user into the system
*/
async loginUser(username: string, , password: string, initOverrides?: RequestInit): Promise<string> {
async loginUser(username: string, password: string, initOverrides?: RequestInit): Promise<string> {
const response = await this.loginUserRaw({ username: username, password: password }, initOverrides);
return await response.value();
}
Expand Down Expand Up @@ -318,7 +318,7 @@ export class UserApi extends runtime.BaseAPI {
* This can only be done by the logged in user.
* Updated user
*/
async updateUser(username: string, , body: User, initOverrides?: RequestInit): Promise<DefaultMetaOnlyResponse> {
async updateUser(username: string, body: User, initOverrides?: RequestInit): Promise<DefaultMetaOnlyResponse> {
const response = await this.updateUserRaw({ username: username, body: body }, initOverrides);
return await response.value();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* tslint:disable */
/* eslint-disable */
export * from './SagaApiManager'
export * from './allSagas'
export * from './BehaviorApi';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* tslint:disable */
/* eslint-disable */
export * from './runtime';
export * from './runtimeSagasAndRecords';
export * from './ApiEntitiesRecord';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* tslint:disable */
/* eslint-disable */
export * from './BehaviorType';
export * from './Category';
export * from './CategoryRecord';
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6d8791c

Please sign in to comment.