Avro Schema Builder
v1.0.0Visual Avro schema builder — primitives, records, unions, defaults, namespaces.
Avro Schema (JSON)
{
"type": "record",
"name": "OrderPlaced",
"namespace": "com.example.events",
"doc": "OrderPlaced event",
"fields": [
{
"name": "orderId",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "customerId",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "totalAmount",
"type": [
"null",
"double"
],
"default": null
},
{
"name": "status",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "createdAt",
"type": [
"null",
"long"
],
"default": null
}
]
}
// Register with Confluent Schema Registry:
curl -X POST http://localhost:8081/subjects/orderplaced-value/versions \
-H "Content-Type: application/vnd.schemaregistry.v1+json" \
-d '{"schema": "{\"type\":\"record\",\"name\":\"OrderPlaced\",\"namespace\":\"com.example.events\",\"doc\":\"OrderPlaced event\",\"fields\":[{\"name\":\"orderId\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"customerId\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"totalAmount\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"status\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"createdAt\",\"type\":[\"null\",\"long\"],\"default\":null}]}"}'