42201 error: Not able to register schema

I am trying to register a json schema from a file, I keep getting this error

curl -X POST -H “Content-Type: application/vnd.schemaregistry.v1+json” --data “@/Users/kkhambadko001/poapprover-schema-1line.json” http://localhost:8081/subjects/orders-approver-topic/versions

{“error_code”:42201,“message”:“Empty schema”} %

I managed to fix this issue.

1 Like

For future reference it might be nice to put the solution here as well. Based on my own experience I suspect the schema wasn’t escaped properly? As the whole schema should itself be just a String, not something nested.