Closed adamtabrams closed 1 year ago
Just bumping this PR @riferrei @AtakanColak
Hi Adam, thank you for your contribution. I'm inclined to merge this change, except the part I've commented on. Could you please either walk me through the cases where empty schema type would be required or revert the change?
Thanks 👍
Older versions of the Confluent Schema Registry API don't support fields
schemaType
orReferences
. Right now, this package always includes these in requests, even if they aren't being used. Since these fields were added to the API, the documentation has stated that they are optional fields. And it's documented thatschemaType
is always assumed to be Avro when it isn't specified.This PR ensures that these fields are only included in the request when they're not empty. And it does this with minimal changes to the package.
I need this behavior in order to use this package for my use case. And I've found a few previous issues that had problems that this PR would address: https://github.com/riferrei/srclient/issues/11 https://github.com/riferrei/srclient/issues/19 https://github.com/riferrei/srclient/issues/21
In addition to the unit tests added in this PR, I've also tested these changes with integration tests specific to my use case.
Please feel free to mention any questions or concerns.