-
Notifications
You must be signed in to change notification settings - Fork 5
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: nested record types generated incorrectly #52
Comments
This project contains a schema merger, this helps you split up your schema in sub schemas to have a better overview. |
But generated schemas should be correct? An example may show how to create templates and schemes... Could you please provide an example of what I should call after: $schemas = $generator->generate();
$generator->exportSchemas($schemas); To get correct |
Just to elaborate a bit more, let's say you have a class:
Then
Merge will unify that, but this way you will not be overwhelmed if you have complicated schema. |
So, essentially $schemas = $generator->generate(); generates templates and not schemas? |
That is correct |
Very contr-intuitive on my mind. |
I totally agree, i should have probably added an example which does both in one go. I should probably also add cli examples in the examples folder 😄 |
Said run your example of generation we got output schema
PhpKafka.PhpAvroSchemaGenerator.Example.SomeTestClass.avsc
(part):Which is incorrect!
AVRO does not have types like
PhpKafka.PhpAvroSchemaGenerator.Example.Wonderland
!In your example it is not very representative, because no any inner classes have fields, but said if
Wonderland
will have single field like:That generated part instead of
should look like:
The text was updated successfully, but these errors were encountered: