-
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: Do not generate Service REST code if there are no matching RPC in a Service #1236
Conversation
.../google/api/generator/gapic/composer/common/AbstractServiceCallableFactoryClassComposer.java
Outdated
Show resolved
Hide resolved
Can we have a golden test(either in the unit tests or integration tests) so that we can easily compare the diff introduced by this PR? |
Yep! Working on it. I was playing around with the showcase tests but I'll sync up with Burke about getting this setup/ working. |
c8e67bf
to
d7ebc76
Compare
f380782
to
3435225
Compare
Will need to do some more local testing to ensure if Http methods are properly generated and that I'm not breaking the generated client libraries. Changes from showcase and goldens look good. Sample application using apigee connect v1:
Output:
|
Kudos, SonarCloud Quality Gate passed! |
This is a PR for Part 2 of Issue #1117: Do not generate any Service related REST code if there are no enabled REST RPC in a Service
Part 1 (MERGED) : #1211
What this PR attempts to do:
HttpJson{Service_Name}CallableFactory
(generated by AbstractServiceCallableFactoryClassComposer and the sub composers)HttpJson{Service_Name}Stub
(generated by AbstractTransportServiceStubClassComposer and the sub composers){Service_Name}StubSettings
(generated by AbstractServiceStubSettingsClassComposer and the sub composers){Service_Name}ServiceSettings
(generated by AbstractServiceSettingsClassComposer and the sub composers){Service_Name}ClientHttpJsonTest
(generated byAbstractServiceClientTestClassComposer
and sub composers)Service class exposes a new
hasAnyEnabledMethodsForTransport()
to determine if the above logic is needed for the Transports (gRPC -> Always enabled vs HttpJson -> Needs to enabled/ eligible).