-
Notifications
You must be signed in to change notification settings - Fork 53
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
Generator incorrectly sets the composeTransport sample's region tag #1272
Comments
@lqiu96 Is the screenshot below capturing the incorrectness you found? |
I'll update the title/body to reflect the entire scope for more clarity. Thanks for the screenshot! The screenshot shows the invalid region tag. The other issue is that the file name/ class is set incorrectly (which I'm fairly certain is due to the region tag name). Context: and it properly tests setting the credentials. The |
As of today, the generated sample still has the name
|
Context:
The SyncCreateSetCredentialsProvider sample already exists: https://github.com/googleapis/google-cloud-java/blob/56c9a8a29c1d04baed958cc028918eea5995aa17/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetCredentialsProvider.java
and it properly showcases setting the credentials. The SyncCreateSetCredentialsProvider1 sample should be named something that reflects that it is using httpjson.
This generator's logic seems to set the wrong region tag name:
https://github.com/googleapis/gapic-generator-java/blob/8ef747b244c9bed128252cb6913d954ae7270251/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/samplecode/ServiceClientHeaderSampleComposer.java#L345
The logic may have been mistakenly copied over. This is creating samples with
SyncCreateSetCredentialsProvider1
as the filename instead of something likeComposeTranport
orUseHttpJsonTransport
.https://github.com/googleapis/google-cloud-java/blob/56c9a8a29c1d04baed958cc028918eea5995aa17/java-tpu/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateSetCredentialsProvider1.java#L23
The text was updated successfully, but these errors were encountered: