-
Notifications
You must be signed in to change notification settings - Fork 21
feat(java): add algolia user agent APIC-338 #347
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
Conversation
✅ Deploy Preview for api-clients-automation canceled.
|
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
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.
This looks good! (and thanks for the docs)
I believe we have tests for this in the client tests btw
|
||
The version is optional for segments. | ||
|
||
The resulting User Agent is the concatenation of `base`, `client`, and all the `segments`. |
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.
Maybe an example of output could help
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.
and the link to this PR
|
||
public String addSegment(Segment seg) { | ||
String segment = seg.toString(); | ||
if (segments.contains(segment)) return finalValue; |
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.
non blocking: I did not saw other one liners in this codebase, we might want to stick to curly brackets for consistency
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.
Looks good! Gg
🧭 What and Why
🎟 JIRA Ticket: APIC-338
Add User-Agent specification in the doc to always have the same format,
and implement it in the java client, as an optional parameter.
🧪 Test
Test the ua in the playground by adding a
System.out.println(ua.toString())
in theApiClient.java
constructor.