Improve AvroSchemaViewer nested type resolution and enum handling#2201
Improve AvroSchemaViewer nested type resolution and enum handling#2201seanmcilvenna wants to merge 2 commits intoevent-catalog:mainfrom
Conversation
🦋 Changeset detectedLatest commit: c2cb143 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
|
Thanks @seanmcilvenna happy to get this in, if you could review the license/cla, and once thats signed we can merge it. thanks for the contribution! |
|
@seanmcilvenna, thanks for working on this! Fixes #1848 |
|
Do you need me to do anything more to merge this PR? I see the Lint check failing, but I think it's an issue with the Lint configuration, not with actual code quality/syntax/format... unless I'm reading the logs wrong. |
|
Just need to review and sign https://cla-assistant.io/event-catalog/eventcatalog?pullRequest=2201, then we can merge it :) |
Problem
The AvroSchemaViewer component had limited support for nested types. It could only expand fields that were direct record types at the top level. If a field was an array, a map, or a union containing a record (e.g., ["null", "record"]), the component:
Solution
Refactored AvroSchemaViewer.tsx to recursively resolve nested types and correctly identify nestable structures regardless of how many levels of unions, arrays, or maps wrap them.
Key Changes: