ResponseCard

Domain

Collapsible card for a single API response showing the status code, description, and response body schema.

Success response (expanded)

Preview

application/json

objectA user account object
id*string(uuid)read-onlyUnique identifier
email*string(email)Email address
name*string
minLength: 1maxLength: 100
roleenumUser role
"admin""editor""viewer"
createdAtstring(date-time)read-only
activebooleandefault: true
Code
<ResponseCard
  response={{
    statusCode: '200',
    description: 'Successful response',
    content: { 'application/json': { schema: userSchema } },
  }}
  defaultOpen
/>

Multiple response cards

Preview

application/json

object
dataarray[object]
totalintegerTotal items
pageinteger
pageSizeinteger
Code
{responses.map((r) => (
  <ResponseCard key={r.responseId} response={r} defaultOpen={r.statusCode.startsWith('2')} />
))}
Sourcemodules/domains/api-doc/ResponseCard.tsx