riferrei / srclient

Golang Client for Schema Registry
Apache License 2.0
236 stars 70 forks source link

Add GetSchemaType method to SchemaRegistryClient #56

Closed dseapy closed 3 years ago

dseapy commented 3 years ago

Signed-off-by: David Seapy dseapy@gmail.com

AtakanColak commented 3 years ago

Again thanks for the PR, could you give some use cases for this functionality?

dseapy commented 3 years ago

I'm wanting to put up another PR against https://github.com/argoproj-labs/argo-dataflow that depends on this functionality. I'd like to be able to use argo dataflow with existing topics that have schemas registered in an existing schema registry. Being able to discover the schema type would allow the argo dataflow code to read/write the data in the appropriate format to the topics (without the type needing to be configured by the user), while allowing argo dataflow to do some basic processing (ie. "filter") by leveraging a json representation of the data using "json" expression (https://github.com/argoproj-labs/argo-dataflow/blob/main/docs/EXPRESSIONS.md#expressions).