-
Notifications
You must be signed in to change notification settings - Fork 156
Description
A small issue was introduced in the in commit 9b91abe, templates/apiService.handlebars
When using the --promises false flag, the resulting type script code contains a wrongly named variable and cannot be compiled:
/**
* Executes an API call, returning the response body only
*/
invoke<P, R>(fn: ApiFnRequired<P, R>, params: P, context?: HttpContext): Observable<R>;
invoke<P, R>(fn: ApiFnOptional<P, R>, params?: P, context?: HttpContext): Observable<R>;
invoke<P, R>(fn: ApiFnRequired<P, R> | ApiFnOptional<P, R>, params: P, context?: HttpContext): Observable<R> {
const resp = this.invoke$Response(fn, params, context);
return obs.pipe(map(r => r.body));
}This issue could be resolved by the following change in the templates/apiService.handlebars file:
Index: templates/apiService.handlebars
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/templates/apiService.handlebars b/templates/apiService.handlebars
--- a/templates/apiService.handlebars (revision 4d6307f99679e2e3ad4e089d8c83c21608a40580)
+++ b/templates/apiService.handlebars (date 1758438620487)
@@ -49,7 +49,7 @@
{{#if promises}}
return (await resp).body;
{{else}}
- return obs.pipe(map(r => r.body));
+ return resp.pipe(map(r => r.body));
{{/if}}
}
Metadata
Metadata
Assignees
Labels
No labels