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

snippetgen: streaming methods have syntax errors #1014

Closed
busunkim96 opened this issue Oct 8, 2021 · 0 comments · Fixed by #1061
Closed

snippetgen: streaming methods have syntax errors #1014

busunkim96 opened this issue Oct 8, 2021 · 0 comments · Fixed by #1061
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@busunkim96
Copy link
Contributor

Generated snippets for streaming methods have incorrect syntax:

# Initialize request argument(s)
request = logging_v2.TailLogEntriesRequest(
resource_names=['resource_names_value'],
)
# Make the request
stream = await client.tail_log_entries([resource_names=['resource_names_value']])
async for response in stream:
print(response)

@busunkim96 busunkim96 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Oct 8, 2021
@busunkim96 busunkim96 self-assigned this Oct 8, 2021
busunkim96 added a commit that referenced this issue Nov 8, 2021
Fixes #1014 and unblocks #1043.

NOTE: Some real world APIs expect the first request to pass a config (example) so the generated samples will not work out of the box. This will be addressed when the new sample config language is sorted out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant