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

## 2.42.0

**`(feat):`** 通过 `use-nullable-annotation` 标志添加对 `nullable<T>` 和 `optional<T>` 类型语义区分的支持。
启用后，`nullable<T>` 生成为带有 `@Nullable` 注释的原始类型 `T`，而 `optional<T>` 仍为 `Optional<T>`。
这为可以为 null 的字段与可能在请求中缺失的字段提供了正确的 API 语义。

```yaml
customConfig:
  use-nullable-annotation: true
```