Skip to content

Add --dry-run flag to share-link create#348

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
feature/share-link-create-dry-run
Jul 9, 2026
Merged

Add --dry-run flag to share-link create#348
AndreyVMarkelov merged 1 commit into
masterfrom
feature/share-link-create-dry-run

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a --dry-run flag to dbxcli share-link create, matching the convention used by mkdir, rm, restore, mv, cp, put, share-link revoke, and share-link update.

  • Text: prints Would create shared link <path> without calling the Dropbox API.
  • JSON: reports status planned with dry_run=true in the input.

The dry-run branch runs after path validation (including the root-path rejection) and flag parsing, so conflicting flags (--expires + --remove-expiration), invalid access/audience, and an empty path still error correctly during a preview.

The planned result reports a synthetic link kind with path_lower (known from input) and an empty url (not knowable without a call). Adds shareLinkCreateResultInput to carry dry_run in the per-result input, which was previously empty for this command. Manifest, JSON contract test, and golden schema updated in lockstep; regenerated docs/schemas show no drift.

Preview shared-link creation without calling the Dropbox API. Text output
prints "Would create shared link <path>"; JSON reports status "planned"
with dry_run=true in the input. The dry-run branch runs after path and
flag validation, so bad input and conflicting flags still error.

The planned result reports a synthetic "link" kind with path_lower (known
from input) and an empty url (not knowable without a call). Adds
shareLinkCreateResultInput to carry dry_run in the per-result input, which
was previously empty for this command.
@AndreyVMarkelov AndreyVMarkelov merged commit 6549543 into master Jul 9, 2026
13 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