-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat: Add add autogenerated javadoc sample for selecting REST transport over gRPC #983
Conversation
…rt over gRPC This is for grpc+rest clients. Also add proper grpc+rest unit tests which were missing.
@blakeli0 PTAL |
@@ -112,7 +114,10 @@ public static List<CommentStatement> createClassHeaderComments( | |||
Service service, | |||
String classMethodSampleCode, | |||
String credentialsSampleCode, | |||
String endpointSampleCode) { | |||
String endpointSampleCode, | |||
String transportStample, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Fixed
Kudos, SonarCloud Quality Gate passed! |
@@ -208,7 +208,10 @@ private static List<CommentStatement> createClassHeaderComments( | |||
service, | |||
SampleCodeWriter.writeInlineSample(classMethodSampleCode.body()), | |||
SampleCodeWriter.writeInlineSample(credentialsSampleCode.body()), | |||
SampleCodeWriter.writeInlineSample(endpointSampleCode.body())); | |||
SampleCodeWriter.writeInlineSample(endpointSampleCode.body()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean to include these null args?
|
||
return ServiceClientCommentComposer.createClassHeaderComments( | ||
service, | ||
SampleCodeWriter.writeInlineSample(classMethodSampleCode.body()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also combine all the different sample.body into one List and pass the whole list to SampleCodeWriter.writeInlineSample()
Utils.saveCodegenToFile(this.getClass(), "GrpcEchoCallableFactory.golden", visitor.write()); | ||
Path goldenFilePath = | ||
Paths.get(Utils.getGoldenDir(this.getClass()), "GrpcEchoCallableFactory.golden"); | ||
Assert.assertCodeEquals(goldenFilePath, visitor.write()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider checking the clazz.samples() as well. See similar grpc tests. See Assert.assertGoldenSamples and assertEmptySamples. Even if there aren't any samples, I think it's good to be clear in the tests which classes generate samples and which don't.
…rt over gRPC (#983) This is for grpc+rest clients. Also add proper grpc+rest unit tests which were missing.
….12.1 (#983) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.auth:google-auth-library-bom](https://github.com/googleapis/google-auth-library-java) | `1.12.0` -> `1.12.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.auth:google-auth-library-bom/1.12.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.auth:google-auth-library-bom/1.12.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.auth:google-auth-library-bom/1.12.1/compatibility-slim/1.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.auth:google-auth-library-bom/1.12.1/confidence-slim/1.12.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/google-auth-library-java</summary> ### [`v1.12.1`](https://github.com/googleapis/google-auth-library-java/blob/HEAD/CHANGELOG.md#​1121-httpsgithubcomgoogleapisgoogle-auth-library-javacomparev1120v1121-2022-10-18) ##### Bug Fixes - Resolve race condition reported in [#​692](https://github.com/googleapis/google-auth-library-java/issues/692) ([#​1031](https://github.com/googleapis/google-auth-library-java/issues/1031)) ([87a6606](https://github.com/googleapis/google-auth-library-java/commit/87a66067dff49d68f5b01cfe4c3f755fbf6b44fb)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-core). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMzguNCIsInVwZGF0ZWRJblZlciI6IjMyLjI0MC41In0=-->
This is for
grpc+rest
clients.Also add proper
grpc+rest
unit tests which were missing.