databricks-cli/cmd/account
Andrew Nester 17ed7a317b
Fixed ignoring required positional parameters when --json flag is provided (#535)
## Changes
When there are positional required parameters in the command which can't
be unmarshalled from JSON, we should require them despite the fact
`--json` flag is provided.

The reason is that for some of the command, for example, `databricks
groups patch ID` these arguments are actually path arguments in API and
can't be set as part of `--json` body provided.

Original change which introduced this ignore logic is here:
https://github.com/databricks/cli/pull/405

Fixes https://github.com/databricks/cli/issues/533,
https://github.com/databricks/cli/issues/537

Note: Code generation is based on the change in this PR:
https://github.com/databricks/databricks-sdk-go/pull/536

## Tests
1. Running `cli groups patch 123 --json {...}` works correctly

Backward compatibility tests with previous changes from
https://github.com/databricks/cli/pull/405
1. `cli clusters events --json '{"cluster_id": "1029-xxxx"}'` - works,
returns list of events
2. `cli clusters events 1029-xxxx` - works, returns list of events
3. `cli clusters events` - works, first prompts for Cluster ID and then
returns the list of events
2023-07-03 13:20:30 +02:00
..
access-control Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
billable-usage Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
budgets Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
credentials Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
custom-app-integration Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
encryption-keys Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
groups Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
ip-access-lists Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
log-delivery Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
metastore-assignments Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
metastores Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
networks Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
o-auth-enrollment Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
private-access Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
published-app-integration Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
service-principal-secrets Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
service-principals Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
settings Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
storage Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
storage-credentials Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
users Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
vpc-endpoints Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
workspace-assignment Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
workspaces Fixed ignoring required positional parameters when --json flag is provided (#535) 2023-07-03 13:20:30 +02:00
cmd.go Associate generated commands with command groups (#475) 2023-06-15 14:47:24 +00:00
groups.go Associate generated commands with command groups (#475) 2023-06-15 14:47:24 +00:00