The <ResponseField> component is designed to define the return values of an API. Many docs also use <ResponseField> on pages when you need to list the types of something.

response
string
required

A response field example

<ResponseField name="response" type="string" required>
  A response field example
</ResponseField>

Props

name
string
required

The name of the response value.

type
string
required

Expected type of the response value - this can be any arbitrary string.

default
string

The default value.

required
boolean

Show “required” beside the field name.

deprecated
boolean

Whether a field is deprecated or not.

pre
string[]

Labels that are shown before the name of the field

post
string[]

Labels that are shown after the name of the field