响应字段
使用 ResponseField 组件通过类型注解、描述和必填或可选标记编写 API 响应字段文档。
使用 <ResponseField> 组件来定义 API 的返回值。在需要列出某些对象的类型时,许多文档页面也会使用 <ResponseField>。
responsestringrequired响应字段示例
<ResponseField name="response" type="string" required>
响应字段示例
</ResponseField>namestringrequired响应值的名称。
typestringrequired响应值的预期类型——可以是任意字符串。
defaultstring默认值。
requiredboolean在字段名旁显示“required”。
deprecatedboolean指示你是否已废弃该字段。
prestring[]出现在字段名之前的标签
poststring[]出现在字段名之后的标签
<ResponseField name="response" type="string" required>
响应字段示例
</ResponseField>Was this page helpful?Suggest editsRaise issue