riferrei / srclient

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

Protobuf Handling #5

Closed maarek closed 4 years ago

maarek commented 4 years ago

https://github.com/riferrei/srclient/blob/f45f25153cd77e3f98d7052d2af01ad99a1d8e87/schemaRegistryClient.go#L187

In CreateSchema newlines are replaced with spaces. This might work when they payload is JSON as would be the case with Avro and JsonSchema but it does not work for Protobuf.

I'm going to recommend that schemaType parameter be converted to an enum type and this data sanitation occur only for Avro and JsonSchema.