mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
fix: Support PathParams not of primitive types for Go in generated tests (#21107)
* fix: Support PathParams not of primitive types for Go in generated tests Signed-off-by: Paul Horton <phorton@sonatype.com> * use tabs consistently --------- Signed-off-by: Paul Horton <phorton@sonatype.com>
This commit is contained in:
parent
5a9f973e91
commit
bdb063f170
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user