-
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
fix(spring): use newHttpJsonBuilder in settings bean for REST transport option #1227
Conversation
src/main/java/com/google/api/generator/spring/composer/SpringAutoConfigClassComposer.java
Outdated
Show resolved
Hide resolved
.setReturnType(STATIC_TYPES.get("InstantiatingHttpJsonChannelProvider")) | ||
.build(); | ||
|
||
if (hasRestOption) { |
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.
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.
For post-preview, I think it would make sense for this property to be automatically set to true for REST-only clients.
Perhaps similar to the way we currently have GRPC-only clients default to useRest = True
behaviour and do not provide the useRest
property as an option to override, we can have REST-only clients default to useRest = True
behaviour and also do not expose the useRest
property to override?
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.
I agree with @emmileaf. I believe we are currently only populating useRest
property in case Transport.GRPC_REST
. So for REST only client, we could skip populating this property and set default to useRest = True
behavior.
Kudos, SonarCloud Quality Gate passed! |
This PR is a follow-up to GoogleCloudPlatform/spring-cloud-gcp#1364 (comment).
Updated behaviour (see #1078) for when
Transport.REST_GRPC
anduseRest = true
(through properties):ServiceSettings
bean usesnewHttpJsonBuilder
TransportChannelProvider
bean definition returnsdefaultHttpJsonTransportProviderBuilder