Add --dry-run flag to share-link create#348
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
--dry-runflag todbxcli share-link create, matching the convention used bymkdir,rm,restore,mv,cp,put,share-link revoke, andshare-link update.Would create shared link <path>without calling the Dropbox API.plannedwithdry_run=truein 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
linkkind withpath_lower(known from input) and an emptyurl(not knowable without a call). AddsshareLinkCreateResultInputto carrydry_runin 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.