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

Generator from IDL doesn't support multiple namespaces #158

Open
AlgMi opened this issue Feb 21, 2022 · 0 comments
Open

Generator from IDL doesn't support multiple namespaces #158

AlgMi opened this issue Feb 21, 2022 · 0 comments

Comments

@AlgMi
Copy link
Contributor

AlgMi commented Feb 21, 2022

Generating scala code from .avdl doesn't create case classes for fields that have different namespace than the protocol.
1.0.0 and older versions are affected

Example:
Only class for Simple record will be created skipping the Constraint enum

@namespace("system.test")
protocol Simple {
	record Simple {
		union { null, int } id = null;
		system.abc.Constraint constraints;
	}
	@namespace("system.abc")
	enum Constraint {
		create, delete
	}
}

Example: Generating from .avsc generates both Simple and Constraint correctly.

{
  "type" : "record",
  "name" : "Simple",
  "namespace" : "system.test",
  "fields" : [ {
    "name" : "id",
    "type" : [ "null", "int" ],
    "default" : null
  }, {
    "name" : "constraints",
    "type" : {
      "type" : "enum",
      "name" : "Constraint",
      "namespace" : "system.abc",
      "symbols" : [ "create", "delete" ]
    }
  } ]
}
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