mirror of https://github.com/databricks/cli.git
Correctly handle required query params in CLI generation (#2027)
## Changes If there's required query params, it is a top-level field of request object and not a field of nested request body. This is needed for upcoming changes from OpenAPI spec changes where such query parameters is introduced. No changes after regenerating CLI with current spec and the fix (appears we haven't had such params before)
This commit is contained in:
parent
13fa43e0f5
commit
5b84856b17
|
@ -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 -}}
|
||||
|
|
Loading…
Reference in New Issue