Skip to content
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

fix: miscellaneous snippet gen fixes #540

Merged
merged 8 commits into from
Dec 5, 2022

Conversation

dwsupplee
Copy link
Contributor

@dwsupplee dwsupplee commented Dec 1, 2022

While going through the influx of new PRs generated by snippet gen I discovered a handful of issues which this PR addresses.

Each commit addresses a separate issue, if preferred I can open multiple PRs - but I thought it would be nice to have the test updates all in one place.

Here are the learnings/fixes:

  1. Fields with a format method aren't only applied at the base request level, they can be found in nested messages as well. Adjusted for this.
  2. Updated inline var block on getResultscalls in LRO samples to annotate the correct item.
  3. Prevent calling serializeToJsonString on primitives.

I also temporarily disabled the inline var block for paginated samples on REST only clients. When the resource type is a map the MethodDetailsclass is having trouble determining the correct type to display. Seems like a wider issue that I plan to address separately.

@dwsupplee dwsupplee requested review from a team as code owners December 1, 2022 23:54
src/Main.php Outdated Show resolved Hide resolved
src/Generation/SnippetGenerator.php Show resolved Hide resolved
Copy link
Contributor

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

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

This looks great! One small request

src/Generation/SnippetGenerator.php Show resolved Hide resolved
@bshaffer bshaffer merged commit 456557a into googleapis:main Dec 5, 2022
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.

None yet

3 participants