Confluent 5.5.0 understands not just Avro schemas, but also json-schema and protobuf. I have a valid json-schema that I'm trying to curl to the schema registry server, but I keep getting the response
curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
--data @$tmpfile ${schemaregistry}/subjects/${topic}-value/versions?schemaType=JSONSCHEMA
{"error_code":42201,"message":"Either the input schema or one its references is invalid"}
The manual is unclear about how to use the schemaType
parameter. I've tried as a query parameter, as a field in the json, ...
The $tmpfile
I'm posting is a json with one top-level field named schema
that contains a quote-escaped json-schema. The same mechanism works perfectly for Avro schemas.
Looking in the logging from the schema registry, I see that it tries to parse the provided data as an Avro schema, so no wonder it fails.
Any help? And Confluent: please clarify and fix your documentation!