Closed arnaldur closed 2 years ago
It comes down to omitempty
treating empty and nil the same way. It would have to be a different struct sent to the registry in order to make absolutely no changes to the data that goes over the wire. If I manage to pack this nicely somehow and make no changes to the requests I'll reopen the PR.
Reopened my PR with separate struct for Karapace requests along with a flag to omitempty
on references
Closed for now, see #68
Currently Karapace requests fail if "references" is set, even if empty: "Unrecognized field: references". https://github.com/aiven/karapace/issues/195
In order to support Karapace in srclient I suggest adding an arg to the CreateSchemaRegistryClient method that allows to override the default behaviour if needed. The only change would be to add
omitempty
on the References field in the structs and looking at the arg to decide if the default empty value for References should be set.Here is my closed PR with code for reference https://github.com/riferrei/srclient/pull/68