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

Include file reference to types #522

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

TristanFloch
Copy link

This PR builds on top of #492 (which is approved but not yet merged).
The later supports splitting the generated documentation into separate files. But when files import each other, the template has no way to know in which file a particular message is defined.

This PR adds the TypeFile member to MessageField template objects, a string designing the file where the type is originally defined. Likewise for Request and Response types in ServiceMethods.

Those attributes allow templates to craft cross file links to type definitions.

Since this impacts performance, it is only enabled when the separate_files option is enabled.
If separate_files is disabled or the type has no particular file (literal types for instance), the TypeFile field will be empty.

@TristanFloch
Copy link
Author

Pinging @pseudomuto as suggested in contributing guidelines 🙂

Tristan Floch added 6 commits July 18, 2023 11:20
This adds a `typeFile` member to message fields.
Those will be empty if the separate file option is off.
Also add new services and messages in Customer.proto to ensure all cross
protofile links are resolved by templates.
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

Successfully merging this pull request may close these issues.

None yet

2 participants