Browse documentation

Avro Schema Validator and Mock Data Generator

Use Mock to generate sample JSON from a registered schema version. Use Lab to check whether a JSON payload matches that version.

Generate mock data from a schema

Open a subject, select a version, and choose Mock. Kafma generates a sample beside the schema.

Mock supports Avro, JSON Schema, and Protobuf, including registered schema references. If a Protobuf schema contains multiple top-level message types, select the type you want to generate.

Click Remock to generate another sample from the same schema, or Copy to use it as a starting point for a producer.

Protobuf schema beside a generated JSON sample with message type, Remock, and Copy controls

The Kafka producer uses the same schema-based generation when you select Generate. In Loop mode, it can create a fresh sample on every interval.

Validate JSON against an Avro schema

Select Lab, enter a JSON payload, and click Validate. Kafma validates it against the selected schema version and schema ID.

JSON syntax errors are marked in the editor before validation. If the payload does not match the schema, Lab reports the affected field path and the reason. A valid payload produces a success notification.

Although the input is JSON, Lab also validates payloads against registered JSON Schema and Protobuf schemas. For Protobuf with multiple top-level message types, select the type represented by the payload.

Avro schema validator showing an invalid JSON payload with its field path and validation error

Validate against another schema version

Use the version selector beside the schema to choose another registered version, then click Validate again. This makes it easy to confirm why the same payload passes one version and fails another.

Lab validates registered versions, not an unpublished draft. After a new version is published, select it in Lab to test payloads against it.

Next steps