Skip to content

Commit 919bdc5

Browse files
Merge pull request #296 from dropbox/json/help-command-manifest
Add JSON help command manifest
2 parents 62706fb + 31ad49b commit 919bdc5

12 files changed

Lines changed: 1284 additions & 37 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ The complete generated command reference is available in [docs/commands/dbxcli.m
152152
153153
### Output formats
154154
155-
Text output is the default. JSON output is available through the global `--output` flag for migrated commands:
155+
Text output is the default. JSON output is available through the global `--output` flag for migrated commands and for help manifests:
156156
157157
```sh
158158
$ dbxcli ls --output=json /
159+
$ dbxcli ls --help --output=json
159160
```
160161
161162
Command results are written to stdout. Status, progress, human-facing warnings, diagnostics, and verbose logs are written to stderr.
@@ -210,7 +211,7 @@ In JSON mode, error responses are written to stdout and the process exits with a
210211
}
211212
```
212213
213-
The full JSON command catalog, stable error codes, and schemas live in [docs/json-schema/v1](https://github.com/dropbox/dbxcli/tree/master/docs/json-schema/v1). Commands that intentionally do not support JSON output yet include `login`, `logout`, and `completion`. Help output and shell-completion protocol commands are text-only.
214+
The full JSON command catalog, stable error codes, and schemas live in [docs/json-schema/v1](https://github.com/dropbox/dbxcli/tree/master/docs/json-schema/v1). Commands that intentionally do not support structured command-result JSON yet include `login`, `logout`, and `completion`, but their help is available as JSON with `--help --output=json`. Shell-completion protocol commands remain text-only.
214215
215216
### Authentication
216217

cmd/add-member.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,5 @@ var addMemberCmd = &cobra.Command{
6767
func init() {
6868
teamCmd.AddCommand(addMemberCmd)
6969
enableStructuredOutput(addMemberCmd)
70+
setCommandDestructiveLevel(addMemberCmd, destructiveLevelAdmin)
7071
}

0 commit comments

Comments
 (0)