pseudomuto / protoc-gen-doc

Documentation generator plugin for Google Protocol Buffers
MIT License
2.64k stars 464 forks source link

Recursively adding enums and messages from nested types. #350

Closed aakoshh closed 5 years ago

aakoshh commented 6 years ago

@pseudomuto I'd like to add a small change to the template.go file to support arbitrarily nested types:

What is Changing? The NewTemplate method's way of collecting Messages and Enums.

How is it Changing? Instead of listing the messages in the file and the ones immediately nested below them, the template will recursively gather all nested messages and enums regardless of how deep they are.

What Could Go Wrong? Nothing that I can see.

lieutdan13 commented 6 years ago

My project could benefit from this feature. We have several nested Enums which do not have any generated docs and the link to the Enum is broken.

aakoshh commented 6 years ago

The templates worked fine for me because the messages and enums are still flattened out, the nesting isn't visible, apart from the long/full name.

JoelPM commented 6 years ago

Any chance of getting this merged? I'd love to use protoc-gen-doc to generate docs, but I'm working with an object model that has deeply nested definitions.

nikayou commented 5 years ago

We would also benefit from that!

nejcgalof commented 5 years ago

Any chance of getting this merged? I tested and its work for me too.

fmcgough commented 5 years ago

This PR is nearly 1 year old :birthday: what needs to happen for it to be merged?

pseudomuto commented 5 years ago

Apologies for the delay everyone