> This page is for SDK, version Legacy.
> For other versions, use one of these documentation indexes:
> - Current (default): https://buildwithfern.com/learn/sdks/current/llms.txt
> - Legacy: https://buildwithfern.com/learn/sdks/legacy/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## 3.11.0

**`(feat):`** 通过 `collapse-optional-nullable` 配置添加对 PATCH 请求中三态可空字段的支持。启用时，可选可空字段使用 `OptionalNullable<T>` 来区分省略的字段、显式 null 值和实际值。这为需要区分"未指定"和"设为 null"的 API 提供了正确的 PATCH 请求语义。

```yaml
customConfig:
  collapse-optional-nullable: true
```

生成的用法：

```java
UpdateRequest.builder()
    .fieldName(OptionalNullable.absent())    // 省略字段
    .anotherField(OptionalNullable.ofNull()) // 清空字段
    .valueField(OptionalNullable.of("value")) // 设置值
    .build();
```