Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suport Karapace #69

Closed
arnaldur opened this issue Feb 8, 2022 · 3 comments
Closed

Suport Karapace #69

arnaldur opened this issue Feb 8, 2022 · 3 comments

Comments

@arnaldur
Copy link

arnaldur commented Feb 8, 2022

Currently Karapace requests fail if "references" is set, even if empty: "Unrecognized field: references".
Aiven-Open/karapace#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
#68

@arnaldur
Copy link
Author

arnaldur commented Feb 8, 2022

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.

golang/go#22480

@arnaldur
Copy link
Author

arnaldur commented Feb 8, 2022

Reopened my PR with separate struct for Karapace requests along with a flag to omitempty on references

@AtakanColak
Copy link
Collaborator

Closed for now, see #68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants