riferrei / srclient

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

Added LookupSchema method to SchemaRegistryClient #55

Closed finncolman closed 3 years ago

finncolman commented 3 years ago

The confluent schema registry API has this endpoint: POST /subjects/(string: subject)

https://docs.confluent.io/platform/current/schema-registry/develop/api.html#post--subjects-(string-%20subject) This is to check if a schema has already been registered under a specific subject. This method is important because it is the schema lookup method that the serialiser is supposed to use if both "auto.register.schemas" and "use.latest.version" are set to false.

I also added test cases.

AtakanColak commented 3 years ago

Thanks, if you could just update the code according to my comment then I'll merge.

AtakanColak commented 3 years ago

@finncolman thank you for your contribution.