Skip to content

chore(cli): test to specify 'summary' as an option in gRPC#10552

Merged
kennyderek merged 15 commits intomainfrom
devin/1763057230-add-grpc-fixture
Nov 14, 2025
Merged

chore(cli): test to specify 'summary' as an option in gRPC#10552
kennyderek merged 15 commits intomainfrom
devin/1763057230-add-grpc-fixture

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Nov 13, 2025

Description

Refs: Session requested by kenny@buildwithfern.com (kenny@buildwithfern.com)
Session URL: https://app.devin.ai/sessions/35ba7fe604104e64afe342a676df4463

This PR adds support for custom fern.summary proto option to explicitly set gRPC endpoint display names in proto files. It also improves the automatic name generation for gRPC endpoints by extracting method names from request type names (e.g., "CreateCommentRequest" → "Create Comment").

Changes Made

  • Added grpc-comments test fixture demonstrating gRPC proto with custom endpoint naming
  • Modified convertPackage.ts to extract method names from request type names for better display names (e.g., "CreateCommentRequest" → "Create Comment")
  • Added support for custom fern.summary proto option in test fixture (proto file includes option (fern.summary) = "Add a Comment";)
  • Temporarily pinned protoc-gen-openapi to commit 1aa7fe8 in CI workflows and bootstrap.sh to support the custom option (depends on feat: add support for custom fern.summary proto option protoc-gen-openapi#13)
  • Added CLI version 0.123.0 with changelog entry for the feature
  • Updated README.md generator (not applicable)

Testing

  • Unit tests added/updated - Added comprehensive test in openapi-from-flag.test.ts for gRPC proto processing
  • Manual testing completed - Verified FDR output shows custom summary "Add a Comment" instead of auto-generated "Create Comment"
  • Test snapshots validate the complete proto → OpenAPI → IR → FDR pipeline

Important Notes for Reviewers

⚠️ Cross-repo dependency: This PR temporarily pins protoc-gen-openapi to a specific commit from PR #13. Once that PR is merged and released, the pin should be updated to @latest or a tagged release.

Key areas to review:

  1. Name extraction logic in convertPackage.ts (lines 170-183): The code extracts method names from request types ending in "Request". Verify this doesn't break existing endpoints or miss edge cases.

  2. Conditional logic: The endpoint name is determined by:

    • First: explicit displayName from IR
    • Second: custom fern.summary option (via OpenAPI summary field)
    • Third: extracted method name from request type (if OpenAPI source + named request type ending in "Request")
    • Fallback: startCase of original name
  3. Test fixture structure: The fern/options.proto file is copied into the test fixture for local testing. This is intentional for the test but should eventually be a proper Buf module dependency.

  4. Pinned dependency: Verify the commit hash 1aa7fe870834ed27024dc44afd95648a0d63ec57 is correct and matches protoc-gen-openapi PR improvement: misc fixes to generate ir #13.

devin-ai-integration bot and others added 2 commits November 13, 2025 18:19
- Add grpc-comments fixture with proto configuration
- Create comments.proto with CreateComment RPC using google.api.http annotations
- Add test case to verify gRPC proto processing pipeline
- Generate FDR snapshots for regression testing

Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
devin-ai-integration bot and others added 2 commits November 13, 2025 21:01
- Add fern/options.proto defining custom summary option for RPC methods
- Update grpc-comments fixture to use fern.summary option
- Custom summary 'Add a Comment' now appears in FDR output
- Remove unused grpc-gateway dependency from fixture

This allows users to explicitly set endpoint display names in gRPC proto files using:
option (fern.summary) = "Custom Name";

Requires protoc-gen-openapi to support reading the fern.summary option.

Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
Resolved conflict in versions.yml by bumping version to 0.122.2

Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
Temporarily pin CI to use the modified protoc-gen-openapi that supports
reading the custom fern.summary option. This allows the grpc-comments test
to pass with the custom summary 'Add a Comment'.

Once fern-api/protoc-gen-openapi#13 is merged and
released, this should be updated to use @latest or a tagged release.

Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
Update both ci.yml and bootstrap.sh to use the modified protoc-gen-openapi
that supports reading the custom fern.summary option from proto files.

This allows the grpc-comments test to pass with the custom summary
'Add a Comment' instead of the auto-generated 'Create Comment'.

Once fern-api/protoc-gen-openapi#13 is merged and
released, these should be updated to use @latest or a tagged release.

Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
The changelog validator requires a minor version bump (0.122.1 -> 0.123.0)
for 'feat' type changes per semver rules. Changed from 0.122.2 to 0.123.0.

Co-Authored-By: kenny@buildwithfern.com <kenny@buildwithfern.com>
@kennyderek kennyderek changed the title chore(cli): add gRPC fixture with comments service chore(cli): specify 'summary' as an option in gRPC Nov 14, 2025
@kennyderek kennyderek enabled auto-merge (squash) November 14, 2025 17:12
@kennyderek kennyderek changed the title chore(cli): specify 'summary' as an option in gRPC chore(cli): test to specify 'summary' as an option in gRPC Nov 14, 2025
@kennyderek kennyderek merged commit 945f805 into main Nov 14, 2025
100 checks passed
@kennyderek kennyderek deleted the devin/1763057230-add-grpc-fixture branch November 14, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant