Skip to content

Conversation

@majiayu000
Copy link
Contributor

Summary

This PR fixes #4419

Changes

  • protoc-gen-openapiv2/internal/genopenapi/template.go
  • protoc-gen-openapiv2/internal/genopenapi/template_test.go

…tions

When generating OpenAPI/Swagger documentation, this change adds support
for using service-level doc comments from proto files as tag descriptions.

Previously, tag descriptions could only be set via explicit OpenAPI options.
Now, if no explicit description is provided, the generator will fall back
to using the leading comments from the service definition in the proto file.

Fixes grpc-ecosystem#4419

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: majiayu000 <[email protected]>
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR! I think you'll need to regenerate the files after a change like this. See CONTRIBUTING.md in the root of the repo for the steps involved.

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.

Support Service doc comments for OpenApi/Swagger generation

2 participants