confluent-kafka-python icon indicating copy to clipboard operation
confluent-kafka-python copied to clipboard

single schema object for to be returned for all method

Open avanishtiwari38 opened this issue 4 years ago • 1 comments

Currently SchemaRegistryClient method have different schema object for different method for example: get_latest_version return you schema with references as array of json as below

[{'name': 'com.test.common.event.Eventdata', 'subject': 'com.test.common.event.Eventdata', 'version': 5}, {'name': 'com.test.schema.user.Details', 'subject': 'com.test.schema.user.Details', 'version': 2}]

While get_schema method return you schema with references as array of SchemaReference object as below

[<confluent_kafka.schema_registry.schema_registry_client.SchemaReference object at 0x1037a9790>, <confluent_kafka.schema_registry.schema_registry_client.SchemaReference object at 0x1037a97f0>]

Which get it difficult to use like need to make different function one for to get schema id and other to get schema object with id that has SchemaReference object.

As it is more like to fetch schema with subject name rather than schema_id because we can map our schema with topic and reuse topic name to fetch the schema.

So this PR will make a single universal schema object that will be returned by any method call.

avanishtiwari38 avatar Oct 06 '21 16:10 avanishtiwari38

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

cla-assistant[bot] avatar Aug 15 '23 18:08 cla-assistant[bot]

Subsumed by https://github.com/confluentinc/confluent-kafka-python/pull/1852

rayokota avatar Dec 12 '24 16:12 rayokota