-
Notifications
You must be signed in to change notification settings - Fork 431
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
Add nested type support to go code generator #1254
Conversation
Adjusted this PR to add both |
Is it possible to add some test cases un the |
@ebeahan @marc-gr I know that there is a plan to eventually strip out the go generators from the ECS repo, does it make sense to do so now? I believe that the only elastic project using the go code is packetbeat, and I think it's pinned to an older version. Otherwise, if we're planning on keeping these around for awhile, maybe we could add the binary type, making it |
@andrewstucki @marc-gr Thanks for taking a look. These are some good discussion points, but I don't want to expand the original scope here too much. Any objections to the proposed mapping for
Ideally, we'd have something in place for testing the go generator portions of the repo, but we don't today. I don't think we should add that testing framework into the ECS repo right now since...
...we definitely want to remove the go generator and eventually the other golang dependencies from this repo. I have no issue with pulling it out, but I'm also not familiar with where it's a dependency. A team or individual would need to take ownership of setting up the new repo; I don't see this as something the ECS team would be best to maintain (right now at least). |
👍 |
Will focus on solely on adding |
20803bf
to
66eb494
Compare
Took a shot at the improved implementation suggested in #1254 (comment). @andrewkroh @andrewstucki would appreciate a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good, but I would find it very helpful if you could temporarily add some nested fields to demonstrate what the generated code looks like and then paste that into comment.
I generated some examples using some |
7645c6b
to
9da4f06
Compare
Thanks! It looks like the tag is missing the key name. It has
where I expected
|
Thanks, @andrewkroh. I believe it's now addressed. Updated the sample gist with the latest versions. |
Introducing
type: nested
will require handling ofnested
fields be defined, else the go code generator will fail.