Skip to content
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

EA-3704 add info endpoint languages supported logic at stratup #45

Merged
merged 8 commits into from
Feb 7, 2024

Conversation

SrishtiSingh-eu
Copy link
Contributor

No description provided.

@@ -83,7 +120,7 @@ public <T> T getTranslationApiResponse(WebClient webClient, Function<UriBuilder,
}

LOGGER.debug("Translation API Client call failed - {}", e.getMessage());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should add the LOGGER.isDebugEnabled() condition

return builder.build();
};
}

private static JsonNode getConfigNode(String json) throws TranslationApiException {
if (!StringUtils.isEmpty(json)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a more efficient way to extract the required JsonNode only, which will simplify significantly this code:
https://cassiomolin.com/programming/using-jackson-and-json-pointer-to-query-and-parse-an-arbitrary-json-node/

would be nice to update the implementation to use this approach

ObjectMapper mapper = new ObjectMapper();
JsonNode node = mapper.readTree(json);
JsonNode coordinatesNode = node.at("/address/coordinates");

@gsergiu gsergiu merged commit 8bee0d0 into develop Feb 7, 2024
1 of 2 checks passed
@SrishtiSingh-eu SrishtiSingh-eu deleted the EA-3704_addsupportedlanguages branch February 20, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants