diff --git a/modules/openapi-generator/src/main/resources/go/api_test.mustache b/modules/openapi-generator/src/main/resources/go/api_test.mustache index 79caa6213eab..0514476b4fbc 100644 --- a/modules/openapi-generator/src/main/resources/go/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/go/api_test.mustache @@ -36,7 +36,12 @@ func Test_{{packageName}}_{{classname}}Service(t *testing.T) { t.Skip("skip test") // remove to run test {{/-first}} + {{#isPrimitiveType}} var {{paramName}} {{{dataType}}} + {{/isPrimitiveType}} + {{^isPrimitiveType}} + var {{paramName}} {{goImportAlias}}.{{{dataType}}} + {{/isPrimitiveType}} {{/pathParams}} {{#returnType}}resp, {{/returnType}}httpRes, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}).Execute()