Skip to content

Add JSON output to team commands with pagination support#286

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
json-team-commands
Jun 25, 2026
Merged

Add JSON output to team commands with pagination support#286
AndreyVMarkelov merged 1 commit into
masterfrom
json-team-commands

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add structured JSON output (--output=json) to team info, team list-members, team list-groups, team add-member, and team remove-member
  • Extract teamClient interface and teamNewFunc factory for testability
  • Add full pagination to list-members and list-groups (previously only returned the first page)
  • Fix text output to use command writers instead of os.Stdout
  • Broaden jsonErrorCode matching from "requires a" to "requires " to cover team command argument errors

Test plan

  • go test ./cmd/... passes — new tests cover JSON output, pagination, text output, error paths, and structured output support for all 5 team commands
  • golangci-lint run ./... passes
  • dbxcli team info --output=json outputs team metadata in operation format
  • dbxcli team list-members --output=json paginates and returns all members
  • dbxcli team list-groups --output=json paginates and returns all groups
  • dbxcli team add-member --output=json outputs mutation result with launch status
  • dbxcli team remove-member --output=json outputs mutation result with launch status

Add structured JSON output to team info, list-members, list-groups,
add-member, and remove-member commands. Extract teamClient interface
for testability, add full pagination to list-members and list-groups,
and fix text output to use command writers instead of os.Stdout.
@AndreyVMarkelov AndreyVMarkelov merged commit 8285450 into master Jun 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant