UI says JSON field not valid but the schema works with schema-registry REST API
j-a-h-i-r opened this issue · 0 comments
j-a-h-i-r commented
Hi, thanks for this cool tool! This makes working with schema-registry easier.
I have noticed an issue during the "Validate" step when trying to create a new subject. My schema is as follows,
{
"type": "record",
"name": "evolution",
"doc": "This is a sample Avro schema to get you started. Please edit",
"namespace": "com.landoop",
"fields": [
{
"name": "json_field",
"default": {"identifier": "", "type": ""},
"type": {
"type": "record",
"name": "json_field",
"fields": [
{
"type": "string",
"name": "identifier"
},
{
"type": "string",
"name": "type"
}
]
}
}
]
}
Upon clicking the Validate
button, the UI displays is not valid
. But if I POST the schema to the schema registry then it works fine.
curl -vs --stderr - -XPOST -i -H "Content-Type: application/vnd.schemaregistry.v1+json" --data '{"schema":"{\"type\":\"record\",\"name\":\"evolution\",\"doc\":\"This is a sample Avro schema to get you started. Please edit\",\"namespace\":\"com.landoop\",\"fields\":[{\"name\":\"json_field\",\"default\":{\"identifier\":\"\",\"type\":\"\"},\"type\":{\"type\":\"record\",\"name\":\"json_field\",\"fields\":[{\"type\":\"string\",\"name\":\"identifier\"},{\"type\":\"string\",\"name\":\"type\"}]}}]}"}' /api/schema-registry/subjects/asdfadsfasdfads/versions