Skip to content

Improve resources command: fix help text and add descriptions#1609

Draft
gfscott wants to merge 2 commits into
masterfrom
gfs/resources-list
Draft

Improve resources command: fix help text and add descriptions#1609
gfscott wants to merge 2 commits into
masterfrom
gfs/resources-list

Conversation

@gfscott
Copy link
Copy Markdown

@gfscott gfscott commented May 25, 2026

Summary

  • Fix the root help template which incorrectly advised running stripe resources help (produces an error) — changed to stripe resources --help
  • Add short descriptions to resource commands by wiring OpenAPI schema descriptions through the code generator, so stripe resources and per-resource --help now show what each resource does

Before:

  customers
  charges
  payment_intents

After:

  customers        This object represents a customer of your business
  charges          The Charge object represents a single attempt to move money into your Stripe account
  payment_intents  A PaymentIntent guides you through the process of collecting a payment from your customer

Test plan

  • go build ./... compiles cleanly
  • go vet ./... passes
  • go test ./pkg/cmd/... ./pkg/gen/... all pass
  • stripe resources shows descriptions for resources
  • stripe customers --help shows description at top

🤖 Generated with Claude Code

gfscott and others added 2 commits May 25, 2026 11:10
The root help template suggested running `stripe resources help` but
that produces an error since the command doesn't accept positional
arguments. Updated to `stripe resources --help`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Wire schema descriptions from the OpenAPI spec through the code
generator so that `stripe resources` and per-resource `--help` output
show a short description for each resource command.

The generator extracts the first sentence of each schema's description,
then cleans it for terminal display (collapses newlines, strips Markdown
links and backticks). Resources without descriptions in the spec are
left blank.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
@gfscott gfscott requested a review from a team as a code owner May 25, 2026 15:55
@gfscott gfscott marked this pull request as draft May 25, 2026 15:56
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