Skip to content

fix(sidekick/swift): route additional bindings - #7967

Open
coryan wants to merge 1 commit into
googleapis:mainfrom
coryan:fix/swift-additional-bindings
Open

coryan wants to merge 1 commit into
googleapis:mainfrom
coryan:fix/swift-additional-bindings

Conversation

@coryan

@coryan coryan commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RPCs without an explicit google.api.routing annotation previously extracted implicit x-goog-request-params parameters only from the first HTTP binding, omitting parameters defined in additional_bindings.

Update annotateMethod and add routingParamsFromBindings in internal/sidekick/swift so fallback extraction walks all HTTP bindings in declaration order and deduplicates repeated routing keys.

For googleapis/google-cloud-swift#1630

Draft changes: googleapis/google-cloud-swift#1675 (no changes, the bug is not triggered by any of the current libraries)

RPCs without an explicit google.api.routing annotation previously
extracted implicit x-goog-request-params parameters only from the first
HTTP binding, omitting parameters defined in additional_bindings.

Update annotateMethod and add routingParamsFromBindings in
internal/sidekick/swift so fallback extraction walks all HTTP bindings
in declaration order and deduplicates repeated routing keys.

For googleapis/google-cloud-swift#1630

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Swift sidekick generator to extract fallback routing parameters across all google.api.http bindings in declaration order, deduplicating repeated routing keys per AIP-4222, rather than only using the first binding. It introduces routingParamsFromBindings in format_path.go and updates annotateMethod to use it. Extensive unit tests have been added to verify this behavior across various binding configurations and to ensure correct Swift stub generation. I have no additional feedback to provide as the implementation is clean and well-tested.

@coryan
coryan marked this pull request as ready for review November 20, 2026 19:27
@coryan
coryan requested a review from a team as a code owner November 20, 2026 19:27
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