Skip to content

Nested types #16

Open
Open
@fracasula

Description

Hi there,

I'm working on a project that makes use of nested types, it's all written in Python and there it works just fine but I'm having some issues to find golang libs or actual examples that show this is supported and used in go too.

Here's an example.

Like in the example above I'm declaring all my types in a single .avsc file and then I reference them between each other (a.k.a. nested/embedded types).

Is this supported by this library? I tried to make it work but I went as far as getting a panic: interface conversion: avro.Schema is *avro.UnionSchema, not *avro.RecordSchema.

The code I used to experiment with is this one but I've changed my schema just by wrapping the entire content in a [].

[
    {
        "type": "record",
        "name": "TestRecord",
        "fields": [
            { "name": "value", "type": "int" }
        ]
    }
]

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions