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

Making ObjectMapper injectable #640

Open
Ant-hem opened this issue Oct 4, 2019 · 4 comments
Open

Making ObjectMapper injectable #640

Ant-hem opened this issue Oct 4, 2019 · 4 comments

Comments

@Ant-hem
Copy link
Member

Ant-hem commented Oct 4, 2019

What do you think of letting our users inject their own ObjectMapper? It could be injected like the HTTP Client. I am opening this issue because it's not the first time I got the request.

WDYT? @BenoitPerrot @aseure

@aseure
Copy link

aseure commented Oct 7, 2019

Disclaimer: I'm not sure of all the implications it would have.

My initial thought is that it could lead to users reporting issues with failed serialization/deserialization of legit Algolia requests and responses (correct me if I'm wrong here @BenoitPerrot).

Side question: are there things which cannot be done because the ObjectMapper is not injectable?

@Ant-hem
Copy link
Member Author

Ant-hem commented Oct 7, 2019

Also found a stackoverflow question about it.

Thing is, we were allowing it in the v2 of the client.

@Benji1109
Copy link

Hi,
Is there any update on this?

@tomaytotomato
Copy link

This is a really necessary feature

For example where Algolia fields are snake case e.g. number_of_employees, it would have been great just to define a

@JsonProperty("number_of_employees")
Integer employees;

This keeps Algolia schema design from polluting Java coding standards, as now I am forced to have a property in my class called.

Integer number_of_employees;

Also because ObjectMapper is not injectable or SearchConfig extendable I cannot override this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants