Rust port of avrotize, a tool to convert JSON Schema into Apache Avro schemas.
avrotize-rs is a high-performance converter that reads JSON Schema documents and produces equivalent Avro schema files.
It aims to be feature-complete with the original Python avrotize, while leveraging Rust’s speed, memory safety, and ecosystem.
Supported features include:
- ✅ Object → Avro
record - ✅ Arrays → Avro
array - ✅
$defsand$refresolution - ✅ Enums (
enum) and constants (const) - ✅ Required vs optional → nullable unions in Avro
- ✅ Descriptions → Avro
docfields - ✅ Maps (
additionalProperties) - ✅ Composition (
oneOf,anyOf,allOf)
- For unsupported features see roadmap
Convert a JSON Schema file to Avro:
cargo run -F cli
Usage: jsonschema2avro <JSONSCHEMA> <AVRO>Fixtures live under tests/fixtures/jsonschema/.
For each fixture, an Avro schema is generated into tests/fixtures/avro/ and compared against a snapshot in tests/snapshots/.
- More robust external
$refresolution - Additional Avro features (fixed, logical types)
- Original avrotize by Clemens Vasters.
- Apache Avro project
- difftastic for beautiful test snapshot diffs