> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiI3NzUzMmEzZC01OThjLTQwZmQtYTdiMC1jY2FmYmI2NTUzZGEiLCJleHAiOjE3NzgzNDY0MTQsImlhdCI6MTc3ODM0NjExNH0.MWj1nVBIl3Et9q5vyxg74MgqcMO9bBKQZfggAGpy53M
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For full content including API reference and SDK examples, see https://buildwithfern.com/learn/llms-full.txt.

# Fern 定义中的导入

> 使用导入功能从其他 Fern 定义文件中引用 API 类型和错误。

导入功能允许您从其他文件中引用类型和错误。

```yaml title="person.yml"
types:
  Person: ...
```

```yaml title="family.yml"
imports:
  person: ./path/to/person.yml
types:
  Family:
    properties:
      people: list<person.Person> # 使用导入的类型
```

请注意，您只能导入存在于您的 Fern 定义中的文件（即，在同一个 `definition/` 文件夹中）。