-
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
feat: Add callable getters for non-eligible or non-enabled REST methods #1211
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blakeli0
reviewed
Jan 5, 2023
...om/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java
Outdated
Show resolved
Hide resolved
blakeli0
reviewed
Jan 5, 2023
...om/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java
Outdated
Show resolved
Hide resolved
lqiu96
commented
Jan 5, 2023
...main/java/com/google/api/generator/gapic/composer/rest/HttpJsonServiceStubClassComposer.java
Outdated
Show resolved
Hide resolved
lqiu96
commented
Jan 5, 2023
...main/java/com/google/api/generator/gapic/composer/rest/HttpJsonServiceStubClassComposer.java
Outdated
Show resolved
Hide resolved
lqiu96
force-pushed
the
main-rest_method_generation
branch
from
January 6, 2023 20:04
00dedbd
to
44e7580
Compare
gcf-owl-bot
bot
removed
the
owlbot:run
Add this label to trigger the Owlbot post processor.
label
Jan 6, 2023
lqiu96
commented
Jan 6, 2023
...om/google/api/generator/gapic/composer/common/AbstractTransportServiceStubClassComposer.java
Show resolved
Hide resolved
@blakeli0 Can you take another look whenever you get a chance? |
blakeli0
reviewed
Jan 9, 2023
gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Method.java
Show resolved
Hide resolved
blakeli0
reviewed
Jan 10, 2023
gapic-generator-java/src/test/java/com/google/api/generator/gapic/model/MethodTest.java
Outdated
Show resolved
Hide resolved
blakeli0
reviewed
Jan 10, 2023
...main/java/com/google/api/generator/gapic/composer/rest/HttpJsonServiceStubClassComposer.java
Outdated
Show resolved
Hide resolved
blakeli0
reviewed
Jan 10, 2023
...main/java/com/google/api/generator/gapic/composer/rest/HttpJsonServiceStubClassComposer.java
Outdated
Show resolved
Hide resolved
blakeli0
approved these changes
Jan 10, 2023
PR comments resolved. Updated message to |
lqiu96
added
the
automerge
Merge the pull request once unit tests and other checks pass.
label
Jan 10, 2023
Kudos, SonarCloud Quality Gate passed! |
gcf-merge-on-green
bot
removed
the
automerge
Merge the pull request once unit tests and other checks pass.
label
Jan 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a PR for Part 1 of #1117 (Override method with clearer exception messages for non-eligible and non-enabled Service RPCs). Opening this while I look at other possible approaches:
Other approaches looked at/ to revisit:
Both approaches above had an issue when setting the return type for the callableGetter. ThrowExpr's type is always set as
UnsupportedOperationException
but the MethodDefinition's return type is not (i.e. for Streams it would be ServerStreamCallable or ClientStreamCallable/ Unary is UnaryCallable vs. Operation, etc.). Would need potentially need another mapping between callableName and method return type for ThrowExprs.This PR's implementation is copied from: https://github.com/googleapis/gapic-generator-java/blob/8c5e17ba325b7711f9ba9501992ab48e736ffc18/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubClassComposer.java#L284-L302
UnsupportedOperationException