mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
bbb1a08ed3
Co-authored-by: locadex-agent[bot] <217277504+locadex-agent[bot]@users.noreply.github.com>
60 lines
1.3 KiB
Plaintext
60 lines
1.3 KiB
Plaintext
---
|
|
title: "响应字段"
|
|
description: "显示 API 响应值。"
|
|
keywords: ["API 输出", "返回值", "响应结构"]
|
|
---
|
|
|
|
`<ResponseField>` 组件用于定义 API 的返回值。在需要列出某些对象的类型时,许多文档页面也会使用 `<ResponseField>`。
|
|
|
|
<ResponseField name="response" type="string" required>
|
|
响应字段示例
|
|
</ResponseField>
|
|
|
|
```mdx
|
|
<ResponseField name="response" type="string" required>
|
|
响应字段示例
|
|
</ResponseField>
|
|
```
|
|
|
|
|
|
<div id="props">
|
|
## 属性
|
|
</div>
|
|
|
|
<ResponseField name="name" type="string" required>
|
|
响应值的名称。
|
|
</ResponseField>
|
|
|
|
<ResponseField name="type" type="string" required>
|
|
响应值的预期类型——可以是任意字符串。
|
|
</ResponseField>
|
|
|
|
<ResponseField name="default" type="string">
|
|
默认值。
|
|
</ResponseField>
|
|
|
|
<ResponseField name="required" type="boolean">
|
|
在字段名旁显示“required”。
|
|
</ResponseField>
|
|
|
|
<ResponseField name="deprecated" type="boolean">
|
|
指示该字段是否为已废弃。
|
|
</ResponseField>
|
|
|
|
<ResponseField name="pre" type="string[]">
|
|
显示在字段名之前的标签
|
|
</ResponseField>
|
|
|
|
<ResponseField name="post" type="string[]">
|
|
显示在字段名之后的标签
|
|
</ResponseField>
|
|
|
|
<RequestExample>
|
|
|
|
```mdx Response Field Example
|
|
<ResponseField name="response" type="string" required>
|
|
响应字段示例
|
|
</ResponseField>
|
|
```
|
|
|
|
</RequestExample> |