feat: add --dry-run flag to resource and raw HTTP commands#1512
Merged
bernerd-stripe merged 4 commits intomasterfrom Mar 26, 2026
Merged
feat: add --dry-run flag to resource and raw HTTP commands#1512bernerd-stripe merged 4 commits intomasterfrom
bernerd-stripe merged 4 commits intomasterfrom
Conversation
Prints a JSON preview of the request that would be sent (method, url, params, headers) without making a live API call. Supports v1 and v2 paths, typed flag values, bracket-notation -d params, path param substitution, and redacted Authorization header. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Committed-By-Agent: claude
Verify that dry-run output represents the same semantic data as what the test server actually receives, for both v1 (form-encoded) and v2 (JSON) request paths. Catches divergence between BuildDryRunOutput and the live request-building path. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Committed-By-Agent: claude
Committed-By-Agent: claude
Collaborator
|
this is great, ty! my only question is whether we want to wrap everything in a |
Contributor
Author
@tomer-stripe I went back and forth on this a bit too, but the thing that won me over (in consultation with claude) is that resource commands like |
Collaborator
|
@bernerd-stripe fair point! alright |
tomer-stripe
approved these changes
Mar 26, 2026
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.
Reviewers
r?
cc @stripe/developer-products
Summary
Adds a
--dry-runflag to all resource commands (stripe customers create,stripe billing meters list, etc.) and the raw HTTP commands (stripe get,stripe post,stripe delete).When set, the command prints a JSON preview of the request that would be sent — method, URL, params, and headers — without making any network calls.
Example:
Behavior:
Authorizationis omitted from the output rather than failingmetadata[env]=staging)expand, idempotency,Stripe-Account, andStripe-Contextparams/headers are reflected accuratelyTesting: