Skip to content

Making ObjectMapper injectable #640

Description

@Ant-hem

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

Activity

  1. aseure commented on Oct 7, 2019

    @aseure

    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?

  2. Ant-hem commented on Oct 7, 2019

    @Ant-hem
    MemberAuthor

    Also found a stackoverflow question about it.

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

  3. Benji1109 commented on Aug 5, 2022

    @Benji1109

    Hi,
    Is there any update on this?

  4. tomaytotomato commented on Jul 15, 2024

    @tomaytotomato

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions