Snippetgen: use f-strings for resource paths #1144
Labels
samplegen
Bugs, features, and so forth pertaining to the generation of samples
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
This feature was added over a few PRs, but is slated to be reverted in #1134 to move forward enabling snippetgen globally.
The desired end state is a snippet that looks like this (the
parent
resource is broken up into pieces to help users construct the correct string).The previously implemented logic for resource messages cannot handle resource fields that are not directly on the request message. Pub/Sub is one example. The generation fails like this:
https://github.com/googleapis/googleapis/blob/master/google/pubsub/v1/pubsub.proto#L931-L940
The text was updated successfully, but these errors were encountered: