Skip to content

Adding custom annotations #549

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

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

Conversation

azykophus
Copy link

Summary

This pull request introduces support for custom annotations required by a project that uses protoc-gen-doc. Specifically, it adds registration logic for new extensions so that these annotations are recognized and included in the generated Markdown documentation.

Details

  • New Annotation Registration

    • Registers one or more new extensions in the relevant files (e.g., extensions.go).
    • Ensures that any proto file using these new annotations will have them parsed and displayed in generated documentation.
  • Minimal Changes

    • Only a few lines are added to extension-processing logic.
    • No breaking changes for existing protoc-gen-doc features.

Rationale

Our project relies on specialized annotations that need to be visible in generated Markdown docs. Merging this upstream eliminates the need to maintain a long-term fork.

Testing

Generated documentation on sample proto files using the new annotations and confirmed they appear as expected.

Future Plans

  • Once this PR is merged, the project can rely on the official protoc-gen-doc release rather than a patched version.
  • We welcome any feedback or suggestions on how best to integrate these annotations.

Thanks for your time and review!

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.

1 participant