apache / camel-quarkus

Apache Camel Quarkus
https://camel.apache.org
Apache License 2.0
256 stars 189 forks source link

Create a `camel-quarkus-support-jackson` extension #4538

Open jamesnetherton opened 1 year ago

jamesnetherton commented 1 year ago

We seem to have Jackson build time logic spread across multiple extensions. Some of it is duplicated.

I think it'd be better if we put most (or all) of the Jackson build time bits in a single extension that can be reused. Build steps can written so they're activated based on what's on the runtime classpath.

ebullient commented 1 year ago

Would this consolidate to reuse/base on the quarkus-jackson extension, too?

I just found that navigating all of this was a mess:

Two references for Jackson (JSON):

Two references for REST

It was trial and error (a lot of it) for me to figure out whether or not I needed quarkus-jackson, camel-quarkus-jackson, or both. (can I just use quarkus-jackson and camel-quarkus can figure it out? We have conditional extensions.. it can be done).

If Jackson and Rest are around, this also felt weird to have to specify so explicitly (I mean, I have jackson on the path, but not any xml stuff.. so why do I have to specify any of that?)

        restConfiguration()
            .dataFormatProperty("autoDiscoverObjectMapper", "true")
            .bindingMode(RestBindingMode.json);

Just bumbled my way into this.. ;)