mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
4c31f3683c
* ai/ keywords * api/ keywords * components/ keywords * create/ keywords * customize/ keywords * api-playground/ keywords * dashboard/ keywords * deploy/ keywords * guides/ keywords * insights/ keywords * integrations/ keywords * optimize/ keywords * organize/ keywords * root/ keywords * rm temp files
58 lines
1.4 KiB
Plaintext
58 lines
1.4 KiB
Plaintext
---
|
|
title: "Response fields"
|
|
description: "Display API response values."
|
|
keywords: ["API output", "return values", "response structure"]
|
|
---
|
|
|
|
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.
|
|
|
|
<ResponseField name="response" type="string" required>
|
|
A response field example
|
|
</ResponseField>
|
|
|
|
```mdx
|
|
<ResponseField name="response" type="string" required>
|
|
A response field example
|
|
</ResponseField>
|
|
```
|
|
|
|
## Props
|
|
|
|
<ResponseField name="name" type="string" required>
|
|
The name of the response value.
|
|
</ResponseField>
|
|
|
|
<ResponseField name="type" type="string" required>
|
|
Expected type of the response value - this can be any arbitrary string.
|
|
</ResponseField>
|
|
|
|
<ResponseField name="default" type="string">
|
|
The default value.
|
|
</ResponseField>
|
|
|
|
<ResponseField name="required" type="boolean">
|
|
Show "required" beside the field name.
|
|
</ResponseField>
|
|
|
|
<ResponseField name="deprecated" type="boolean">
|
|
Whether a field is deprecated or not.
|
|
</ResponseField>
|
|
|
|
<ResponseField name="pre" type="string[]">
|
|
Labels that are shown before the name of the field
|
|
</ResponseField>
|
|
|
|
<ResponseField name="post" type="string[]">
|
|
Labels that are shown after the name of the field
|
|
</ResponseField>
|
|
|
|
<RequestExample>
|
|
|
|
```mdx Response Field Example
|
|
<ResponseField name="response" type="string" required>
|
|
A response field example
|
|
</ResponseField>
|
|
```
|
|
|
|
</RequestExample>
|