File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
fern/products/sdks/overview/java/changelog Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ ## 3.11.0
2+ ** ` (feat): ` ** Add support for three-state nullable fields in PATCH requests via ` collapse-optional-nullable ` config.
3+ When enabled, optional nullable fields use ` OptionalNullable<T> ` to distinguish between omitted fields,
4+ explicit null values, and actual values. This enables proper PATCH request semantics for APIs that need
5+ to differentiate between "not specified" and "set to null".
6+
7+ ``` yaml
8+ customConfig :
9+ collapse-optional-nullable : true
10+ ` ` `
11+
12+ Generated usage:
13+ ` ` ` java
14+ UpdateRequest.builder()
15+ .fieldName(OptionalNullable.absent()) // Omit field
16+ .anotherField(OptionalNullable.ofNull()) // Clear field
17+ .valueField(OptionalNullable.of("value")) // Set value
18+ .build();
19+ ```
20+
21+
You can’t perform that action at this time.
0 commit comments