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

Wrong handling of namespaces #149

Open
Nopik opened this issue Nov 29, 2023 · 0 comments
Open

Wrong handling of namespaces #149

Nopik opened this issue Nov 29, 2023 · 0 comments

Comments

@Nopik
Copy link

Nopik commented Nov 29, 2023

It seems, that record field types are not properly nested with a record namespace. Namely having a.avsc schema:

{
  "type": "enum",
  "name": "A",
  "namespace": "com.example",
  "symbols": [
    "foo",
    "bar"
  ]
}

and b.avsc schema:

{
  "type": "record",
  "name": "B",
  "namespace": "com.example",
  "fields": [
    {
      "name": "a",
      "type": "A"
    }
  ]
}

Doesn't work - when avro-ts a.avsc b.avsc is executed, the resulting b.avsc.ts file has no import. If, however, "type": "A" is replaced with "type": "com.example.A", import shows up. This seems to be conflicting with Avro specification and also with how avsc package handles this.

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