Skip to content

name the Card resource on the CARD.STATE_CHANGE webhook - #953

Draft
ls-bolt[bot] wants to merge 1 commit into
mainfrom
09-11-name-the-card-resource-on-the-card-state-change-webhook
Draft

name the Card resource on the CARD.STATE_CHANGE webhook#953
ls-bolt[bot] wants to merge 1 commit into
mainfrom
09-11-name-the-card-resource-on-the-card-state-change-webhook

Conversation

@ls-bolt

@ls-bolt ls-bolt Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

The two card webhook reference pages didn't render the same way. Card transaction names its payload — Card Transaction · object, with a description of the resource — because CardTransaction declares a title. Card state change rendered a bare, anonymous data object with no description, because Card declared neither, even though the webhook already $refs the Card resource.

Nothing told a reader that the CARD.STATE_CHANGE payload is the Card resource — they had to expand child attributes and recognize the shape.

This adds title: Card and a description to the Card schema, the same treatment CardTransaction got in #639. The page now renders Card · object with the resource description, and GET /cards picks up the same named chip on its data array.

No schema shape change: no properties, required entries, or validation rules are touched, so this is not a breaking change and info.version is unmodified.

Changes: 3 files

  • openapi/components/schemas/cards/Card.yaml — add title + description
  • openapi.yaml, mintlify/openapi.yaml — regenerated via make build (same two lines)

On the "card transaction object" ask

Already in the spec, no change needed — CardTransaction exists at openapi/components/schemas/cards/CardTransaction.yaml, is wired into all four CARD_TRANSACTION.* webhook types and the Transaction list (TransactionOneOf), is exported to the SDKs via .stainless/stainless.yml, and is present under components.schemas.CardTransaction in the published Stainless spec the docs render from. Verified against the live openapi.documented.yml.

Test plan

  • make lint-openapi — passes. Spectral finding count is 545 before and after, so no warning was silently added (a description beside a $ref would have added one; this description sits on the schema itself).
  • mint openapi-check openapi.yaml (CLI 4.2.284) — OpenAPI definition is valid.
  • Rendered locally with mint dev against the bundled spec and screenshotted each affected page:
    • webhooks/card-state-changedata now renders Card · object with the description (was a bare object with none).
    • webhooks/card-transaction — unchanged, still Card Transaction · object.
    • cards/list-cardsdata now renders Card · object[].
    • cards/issue-a-card — response body picks up the description.

Requested by @AaryamanBhute

@mintlify

mintlify Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Grid 🟢 Ready View Preview Sep 11, 2026, 9:35 PM

@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
grid-flow-builder Ignored Ignored Preview Sep 11, 2026 9:33pm UTC
grid-wallet-demo Ignored Ignored Preview Sep 11, 2026 9:33pm UTC

Request Review

@ls-bolt ls-bolt Bot added the bolt label Sep 11, 2026

Copy link
Copy Markdown

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli

chore(internal): regenerate SDK with no functional changes

go

docs(types): add docstrings to Card and CardStateChangeWebhookEvent types

kotlin

docs(api): add Card and CardStateChangeWebhookEvent model documentation

openapi

docs(types): add title and description to Card model

php

docs(types): add descriptions to Card model and CardStateChangeWebhookEvent

python

docs(types): add documentation to Card model

ruby

docs(types): add Card and CardStateChangeWebhookEvent descriptions

typescript

docs(types): add description to Card model and webhook event

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-typescript studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ⏭️lint ⏭️test ⏭️

grid-cli studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ⏭️lint ⏭️test ⏭️

grid-openapi studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️

grid-ruby studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ⏭️lint ⏭️test ⏭️

grid-kotlin studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ⏭️lint ⏭️test ⏭️

grid-go studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ⏭️lint ⏭️test ⏭️

go get github.com/stainless-sdks/grid-go@8e11a32f1902dc27d3ee1f830530a02c7eb0096f
grid-python studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ⏭️lint ⏭️test ⏭️

grid-php studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅lint ⏭️test ⏭️


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-09-11 21:43:37 UTC

@ls-bolt

ls-bolt Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

@greptile review

@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge because it only adds synchronized documentation metadata to the Card schema.

Summary

  • Adds title: Card and a lifecycle-oriented description to the modular Card schema.
  • Updates both generated OpenAPI bundles with matching content.
  • Does not alter properties, required fields, validation, or webhook payload shape.

Reviews (1) · Last reviewed commit: "name the Card resource on the CARD.STATE..."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants