From b1c13afc7cb003cbd4b588e302983fc4bd289da9 Mon Sep 17 00:00:00 2001 From: Ruben Hoenle Date: Fri, 16 May 2025 09:54:53 +0200 Subject: [PATCH] fix(generator): use correct return type to prevent compile errors relates to #157 --- templates/go/api.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/go/api.mustache b/templates/go/api.mustache index 879615c..e536fad 100644 --- a/templates/go/api.mustache +++ b/templates/go/api.mustache @@ -104,7 +104,7 @@ func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}{{operationId}}Request) a := r.apiService client, ok := a.client.(*APIClient) if !ok { - return {{#returnType}}nil, {{/returnType}} fmt.Errorf("could not parse client to type APIClient") + return {{#returnType}}localVarReturnValue, {{/returnType}} fmt.Errorf("could not parse client to type APIClient") } localBasePath, err := client.cfg.ServerURLWithContext(r.ctx, "{{{classname}}}Service.{{{nickname}}}") if err != nil {