Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested types #16

Open
fracasula opened this issue Apr 19, 2018 · 0 comments
Open

Nested types #16

fracasula opened this issue Apr 19, 2018 · 0 comments

Comments

@fracasula
Copy link

fracasula commented Apr 19, 2018

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" }
        ]
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant