diff --git a/.codegen/service.go.tmpl b/.codegen/service.go.tmpl index ef7977e1bd..ee2c7b0fd9 100644 --- a/.codegen/service.go.tmpl +++ b/.codegen/service.go.tmpl @@ -411,5 +411,5 @@ func new{{.PascalName}}() *cobra.Command { {{- define "request-body-obj" -}} {{- $method := .Method -}} {{- $field := .Field -}} - {{$method.CamelName}}Req{{ if (and $method.RequestBodyField (not $field.IsPath)) }}.{{$method.RequestBodyField.PascalName}}{{end}}.{{$field.PascalName}} + {{$method.CamelName}}Req{{ if (and $method.RequestBodyField (and (not $field.IsPath) (not $field.IsQuery))) }}.{{$method.RequestBodyField.PascalName}}{{end}}.{{$field.PascalName}} {{- end -}}