Hi All-

Until recently our REST API returned full records in most cases, including often lots of empty lists and maps and sometimes nulls -- such as `constraints: []` on all config keys.

The widespread preference in REST / JSON community seems to be to omit these unless there is a very good reason for having them, e.g. Google JSON Style Guide [1].

Recently in replacing deprecated FasterXML annotations with newer ones many fields were changed to be included only if NON_EMPTY, in line with that preference, but this is technically a breaking change. And it's not just technical, as there are a few places in UI code which assume fields exist which now do break. These are easy to fix once they're encountered at runtime but tedious to ensure no problems at design time.

Thus we have two choices:

* Yes, make this break now. This (v1.0) is probably the best time. There is no efficient way to pass this through a deprecation cycle. Cost is adding to release nodes and REST API client breakages and fixes. * No, revert any `Include(NON_EMPTY)` annotations recently introduced to be strict about backwards-compatibility here. Cost is restoring old behaviour and bloat/ugliness in the API response objects.

I have a preference for "Yes", roll-forward and tolerate some breakages with the shift to 1.0.

Best
Alex


[1] https://google.github.io/styleguide/jsoncstyleguide.xml#Empty/Null_Property_Values

Reply via email to