Skip to content

feat(sidekick/swift): improve snippet body#6434

Draft
coryan wants to merge 2 commits into
googleapis:mainfrom
coryan:feat-swift-snippet-body
Draft

feat(sidekick/swift): improve snippet body#6434
coryan wants to merge 2 commits into
googleapis:mainfrom
coryan:feat-swift-snippet-body

Conversation

@coryan

@coryan coryan commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Make the body more readable by using a single .with{} call for all the fields.

For AIP-standard Create*() and Update*() requests we can show how the body field is initialized.

Make the body more readable by using a single `.with{}` call for all the
fields.

For AIP-standard `Create*()` and `Update*()` requests we can show how
the body field is initialized.

@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 refactors the Swift mustache template method_request_body.mustache to consolidate multiple .with block wrappers into a single outer .with block, and adds handling for ResourceIDField and non-message resource MessageFields. Feedback suggests simplifying the reference to {{MessageField.Codec.BaseFieldType}} to {{Codec.BaseFieldType}} since it is already inside the {{#MessageField}} context block.

Comment thread internal/sidekick/swift/templates/snippet/method_request_body.mustache Outdated
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