Skip to content

Commit

Permalink
ISSUE-14095: added overloaded method for method initClient to accept …
Browse files Browse the repository at this point in the history
…Feign.Builder as one of the method's parameter. (open-metadata#14175)

Co-authored-by: Teddy <teddy.crepineau@gmail.com>
  • Loading branch information
2 people authored and Shiyang Xiao committed Dec 12, 2023
1 parent 3055f96 commit bc81ff5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,17 @@ public OpenMetadata(OpenMetadataConnection config, boolean validateVersion) {
}

public void initClient(OpenMetadataConnection config) {
apiClient = new ApiClient();
Feign.Builder builder =
Feign.builder()
.encoder(new FormEncoder(new JacksonEncoder(apiClient.getObjectMapper())))
.decoder(new JacksonDecoder(apiClient.getObjectMapper()))
.logger(new Slf4jLogger())
.client(new OkHttpClient());
initClient(config, builder);
}

public void initClient(OpenMetadataConnection config, Feign.Builder builder) {
apiClient = new ApiClient();
apiClient.setFeignBuilder(builder);
AuthenticationProviderFactory factory = new AuthenticationProviderFactory();
apiClient.addAuthorization("oauth", factory.getAuthProvider(config));
Expand Down

0 comments on commit bc81ff5

Please sign in to comment.