---
title: "端点 Schema 片段"
subtitle: "<EndpointSchemaSnippet> 引用 API 参考中某个端点的请求或响应结构。"
---

这个组件引用 API 参考中的数据，随 OpenAPI 规范自动更新。下面的示例引用的都是本站的[平台 API](/api-reference)。

端点某一部分的字段表：

```mdx
<EndpointSchemaSnippet endpoint="PUT /sites/{site}/access" selector="request.body" />
```

<EndpointSchemaSnippet endpoint="PUT /sites/{site}/access" selector="request.body" />

<ParamField path="endpoint" type="string" required>同上。</ParamField>
<ParamField path="selector" type="string">要显示的部分：`request`、`request.path`、`request.query`、`request.header`、`request.cookie`、`request.body`、`response`、`response.body`、`response.errors`（或 `errors`）。默认 `request`。</ParamField>

在页面的 `.md` 版本里，它是字段表，嵌套字段写成 `a.b`、`list[].c`。
