Skip to content

Commit 88ed52f

Browse files
ffMathymacjohnny
authored andcommitted
typescript-fetch: fix return type of primitive value (#4028)
* Update apis.mustache Fixes #3709 and #2870. * Update apis.mustache * added new petstore code.
1 parent c136b83 commit 88ed52f

8 files changed

Lines changed: 8 additions & 8 deletions

File tree

modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export class {{classname}} extends runtime.BaseAPI {
232232
return new runtime.JSONApiResponse<any>(response);
233233
{{/isListContainer}}
234234
{{#returnSimpleType}}
235-
return new runtime.TextApiResponse(response);
235+
return new runtime.TextApiResponse(response) as any;
236236
{{/returnSimpleType}}
237237
{{/returnTypeIsPrimitive}}
238238
{{^returnTypeIsPrimitive}}

samples/client/petstore/typescript-fetch/builds/default/src/apis/UserApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export class UserApi extends runtime.BaseAPI {
244244
query: queryParameters,
245245
});
246246

247-
return new runtime.TextApiResponse(response);
247+
return new runtime.TextApiResponse(response) as any;
248248
}
249249

250250
/**

samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/UserApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export class UserApi extends runtime.BaseAPI {
244244
query: queryParameters,
245245
});
246246

247-
return new runtime.TextApiResponse(response);
247+
return new runtime.TextApiResponse(response) as any;
248248
}
249249

250250
/**

samples/client/petstore/typescript-fetch/builds/multiple-parameters/src/apis/UserApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export class UserApi extends runtime.BaseAPI {
244244
query: queryParameters,
245245
});
246246

247-
return new runtime.TextApiResponse(response);
247+
return new runtime.TextApiResponse(response) as any;
248248
}
249249

250250
/**

samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/UserApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export class UserApi extends runtime.BaseAPI {
244244
query: queryParameters,
245245
});
246246

247-
return new runtime.TextApiResponse(response);
247+
return new runtime.TextApiResponse(response) as any;
248248
}
249249

250250
/**

samples/client/petstore/typescript-fetch/builds/typescript-three-plus/src/apis/UserApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export class UserApi extends runtime.BaseAPI {
244244
query: queryParameters,
245245
});
246246

247-
return new runtime.TextApiResponse(response);
247+
return new runtime.TextApiResponse(response) as any;
248248
}
249249

250250
/**

samples/client/petstore/typescript-fetch/builds/with-interfaces/src/apis/UserApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export class UserApi extends runtime.BaseAPI {
244244
query: queryParameters,
245245
});
246246

247-
return new runtime.TextApiResponse(response);
247+
return new runtime.TextApiResponse(response) as any;
248248
}
249249

250250
/**

samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/UserApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export class UserApi extends runtime.BaseAPI {
244244
query: queryParameters,
245245
});
246246

247-
return new runtime.TextApiResponse(response);
247+
return new runtime.TextApiResponse(response) as any;
248248
}
249249

250250
/**

0 commit comments

Comments
 (0)