kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clint Mcneil <clintmcn...@gmail.com>
Subject schemaregistry example
Date Tue, 31 Mar 2015 08:51:21 GMT
Hi guys

When trying the example schema in
http://confluent.io/docs/current/schema-registry/docs/api.html

POST /subjects/test HTTP/1.1Host: schemaregistry.example.comAccept:
application/vnd.schemaregistry.v1+json,
application/vnd.schemaregistry+json, application/json
{
      "schema":
         "{                \"type\": \"record\",
\"name\": \"test\",                \"fields\":                  [
              {                      \"type\": \"string\",
         \"name\": \"field1\"                    },
{                      \"type\": \"integer\",
\"name\": \"field2\"                    }                  ]
   }"
    }

I get the following error...

IR-52:confluent-1.0 clint$ curl -X POST -i -H "Content-Type:
application/vnd.schemaregistry.v1+json" \
> --data '{"schema": "{ \"type\": \"record\", \"name\": \"test\", \"fields\": [{ \"type\":
\"string\", \"name\": \"field1\" }, { \"type\": \"integer\", \"name\": \"field2\" }]}"}' \
> http://localhost:8081/subjects/Clint1-key/versions
HTTP/1.1 422
Content-Length: 71
Content-Type: application/vnd.schemaregistry.v1+json
Server: Jetty(8.1.16.v20140903)

{"error_code":42201,"message":"Input schema is an invalid Avro
schema"}IR-52:confluent-1.0 clint$

Please advise

Thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message