Repository navigation
feat(avro): add --format avsc option to export Avro JSON Schema - #570
Open
DavidMatzek wants to merge 2 commits into
Open
DavidMatzek wants to merge 2 commits into
DavidMatzek wants to merge 2 commits into
Conversation
added 2 commits
October 9, 2026 12:12
Signed-off-by: q420386 <david.dm.matzek@bmw.de>
Add Output formats section to docs/avro.md, set enum default UNKNOWN in AVSC for parity with IDL, and add tests for shared records/enums, spec-order validity and CLI options. Signed-off-by: q420386 <david.dm.matzek@bmw.de>
DavidMatzek
force-pushed
the
feat/avro-format-avsc
branch
from
October 9, 2026 10:13
d0ab459 to
7288723
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
--format [idl|avsc]option to theavroexporter (defaultidl, existing behavior unchanged). With--format avsc, the exporter writes native Avro JSON Schema (.avsc) files directly, one self-contained file per top-level struct. Users no longer need to export.avdland convert it withavro-tools idl2schemata.Changes
--format idl|avscoption (case-insensitive, defaultidl).["null", T]union, matching the IDLunion { null, T }.UNKNOWNfirst and set"default": "UNKNOWN"(IDL:= UNKNOWN).--include-array-recordproduces a<Struct>Arrayroot record wrapping the struct.--file-prefixapplies to.avscfilenames.Documentation
docs/avro.md: new "Output formats" section (IDL vs AVSC comparison, AVSC embedding rules, examples) and--formatin the options table.CHANGELOG.md: entry under Unreleased.Tests
Devicetest struct: an enum inside a nested struct, and a record referenced three times..avdl,--format avsc, case-insensitive format, invalid format rejected, file prefix, array record, valid JSON output.Compatibility
No behavior change for existing users;
idlremains the default and its output is unchanged.