pseudomuto / protoc-gen-doc

Documentation generator plugin for Google Protocol Buffers
MIT License
2.59k stars 462 forks source link

Use full path for cross-file links #443

Closed renjiexu closed 3 years ago

renjiexu commented 3 years ago

Hi team,

In our company, we're using namespace such as following:

company
├── account
│   └── rpc
│       └── v1
│           └── account_api.proto
├── webhook
│   └── v1
│       └── webhook.proto
|       └── api.proto

instead of generating one html for all the *.proto, we generate one for each namespace:

company
├── account
│   └── rpc
│       └── v1
│           └── index.html
├── webhook
│   └── v1
│       └── index.html

However, if webhook.proto refers a type in account_api.proto, the link would not work. This PR would address the problem, confirmed it's working for me, would like your thoughts on this before adding specs.

(might be able to solve the request of https://github.com/pseudomuto/protoc-gen-doc/issues/406)

Thanks, Renjie

renjiexu commented 3 years ago

Need to recreate upstream branch, closing out