Description
Is your feature request related to a problem? Please describe.
We'd like to use the generated models for a Merge Patch API.
It's similar to https://tools.ietf.org/html/rfc7396, where missing fields in the request payload are left untouched, and explicit null
fields are unset.
At the moment there doesn't seem to be a place to track the explicitly null
'ed fields and by default they are missing from request payloads.
Describe the solution you'd like
Add a magic map field (e.g. Set<?> changedFields
) or a magic boolean field for each actual field (e.g. for someField
it can have boolean isSomeFieldChanged
) to track changed fields via field mutators, and include these fields in serialisation result even if they are null.
Describe alternatives you've considered
Copy out the generated models and manually do what I described above.