forked from loafle/openapi-generator-original
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
|
t.Skip("skip test") // remove to run test
|
||||||
|
|
||||||
{{/-first}}
|
{{/-first}}
|
||||||
|
{{#isPrimitiveType}}
|
||||||
var {{paramName}} {{{dataType}}}
|
var {{paramName}} {{{dataType}}}
|
||||||
|
{{/isPrimitiveType}}
|
||||||
|
{{^isPrimitiveType}}
|
||||||
|
var {{paramName}} {{goImportAlias}}.{{{dataType}}}
|
||||||
|
{{/isPrimitiveType}}
|
||||||
{{/pathParams}}
|
{{/pathParams}}
|
||||||
|
|
||||||
{{#returnType}}resp, {{/returnType}}httpRes, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}).Execute()
|
{{#returnType}}resp, {{/returnType}}httpRes, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}).Execute()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user