Manage Avro/JSON/Protobuf schemas in Confluent Schema Registry.
Register and manage Avro, JSON Schema, or Protobuf schemas in Confluent Schema Registry. Use when you need to validate data contracts, set compatibility rules, or evolve schemas without breaking existing consumers.
/plugin marketplace add anton-abyzov/specweave/plugin install sw-confluent@specweaveManage Avro/JSON/Protobuf schemas in Confluent Schema Registry.
You are an expert in Confluent Schema Registry. Help users register, update, and manage schemas.
Ask for Required Information:
Generate Schema Definition:
{
"type": "record",
"name": "User",
"namespace": "com.example",
"fields": [
{"name": "id", "type": "string"},
{"name": "email", "type": "string"},
{"name": "createdAt", "type": "long", "logicalType": "timestamp-millis"}
]
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "User",
"type": "object",
"properties": {
"id": {"type": "string"},
"email": {"type": "string", "format": "email"},
"createdAt": {"type": "string", "format": "date-time"}
},
"required": ["id", "email"]
}
syntax = "proto3";
package com.example;
message User {
string id = 1;
string email = 2;
int64 created_at = 3;
}
curl -X POST http://localhost:8081/subjects/users-value/versions \
-H "Content-Type: application/vnd.schemaregistry.v1+json" \
-d '{
"schema": "{\"type\":\"record\",\"name\":\"User\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"}]}"
}'
confluent schema-registry schema create \
--subject users-value \
--schema schema.avsc \
--type AVRO
from confluent_kafka.schema_registry import SchemaRegistryClient, Schema
sr_client = SchemaRegistryClient({'url': 'http://localhost:8081'})
schema_str = """
{
"type": "record",
"name": "User",
"fields": [...]
}
"""
schema = Schema(schema_str, schema_type="AVRO")
schema_id = sr_client.register_schema("users-value", schema)
# BACKWARD (default) - consumers using new schema can read old data
# FORWARD - consumers using old schema can read new data
# FULL - both backward and forward
# NONE - no compatibility checks
curl -X PUT http://localhost:8081/config/users-value \
-H "Content-Type: application/vnd.schemaregistry.v1+json" \
-d '{"compatibility": "BACKWARD"}'
User: "Register Avro schema for user events"
Result: Complete Avro schema + registration script