Reputation: 305
am trying to publish json schema from rest-proxy but getting exception
curl -k -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" --data '{"schema": "{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"age":{"type":"integer"}}}"}' https://localhost:8081/subjects/schemaregistry.json-value/versions
is the json schema format wrong? please advise
error: {"error_code":42201,"message":"Either the input schema or one its references is invalid"}
Upvotes: 0
Views: 822
Reputation: 305
{"schema":"{\"type\":\"object\",\"properties\":{\"firstname\":{\"type\":\"string\"},\"lastname\":{\"type\":\"string\"},\"age\":{\"type\":\"integer\"}}}", "schemaType":"JSON"}
"schemaType":"JSON" is mandatory to publish json schema
Upvotes: 1