> 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.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiIyYmYxYjQ1OC1jZTUzLTRkMjctYjExYi0xMWNlYmM3ZjNlOTUiLCJleHAiOjE3Nzg0OTI5NTYsImlhdCI6MTc3ODQ5MjY1Nn0.dRyq0dfy25Xkz6Mdj2HxpuBWEoPXgksvX9VOec-YbYM
>
> 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.

# 忽略元素

> 使用 x-fern-ignore 从您的 OpenAPI 规范中排除端点、模式、属性或参数。控制 Fern 读取和处理的内容。

如果您希望 Fern 跳过读取任何端点、模式、属性或参数，请使用 `x-fern-ignore` 扩展。

## 忽略端点

要跳过端点，请在操作级别添加 `x-fern-ignore: true`。

```yaml title="openapi.yml 中操作级别的 x-fern-ignore" {4}
paths:
  /users:
    get:
      x-fern-ignore: true
      ...
```

## 忽略模式

要跳过模式，请在模式级别添加 `x-fern-ignore: true`。

```yaml title="openapi.yml 中模式级别的 x-fern-ignore" {4}
components:
  schemas:
    SchemaToSkip:
      x-fern-ignore: true
      ...
```

## 忽略属性

要跳过模式中的属性，请在属性级别添加 `x-fern-ignore: true`。

```yaml title="openapi.yml 中属性级别的 x-fern-ignore" {9}
components:
  schemas:
    User:
      type: object
      properties:
        name:
          type: string
        internalField:
          x-fern-ignore: true
          type: string
```

## 忽略参数

要跳过参数，请在参数级别添加 `x-fern-ignore: true`。

```yaml title="openapi.yml 中参数级别的 x-fern-ignore" {7}
paths:
  /users:
    get:
      parameters:
        - name: internalParam
          in: query
          x-fern-ignore: true
          schema:
            type: string
```

<Tip>
  要在不修改基础规范的情况下跳过参数，请在您的[覆盖文件](/learn/api-definitions/openapi/overrides)中使用 `null` 值来删除参数：

  ```yaml title="overrides.yml" {5}
  paths:
    /users:
      get:
        parameters:
          - null  # 从基础规范中删除第一个参数
  ```
</Tip>