Skip to navigation

3.11.0

(feat): Add support for three-state nullable fields in PATCH requests via collapse-optional-nullable config. When enabled, optional nullable fields use OptionalNullable<T> to distinguish between omitted fields, explicit null values, and actual values. This enables proper PATCH request semantics for APIs that need to differentiate between “not specified” and “set to null”.

customConfig:
collapse-optional-nullable: true

Generated usage:

UpdateRequest.builder()
.fieldName(OptionalNullable.absent()) // Omit field
.anotherField(OptionalNullable.ofNull()) // Clear field
.valueField(OptionalNullable.of("value")) // Set value
.build();