apache / camel-quarkus

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

Investigate potential FHIR model classes missing from reflective class registration #6613

Open jamesnetherton opened 1 month ago

jamesnetherton commented 1 month ago

Bug description

Something I noticed while hacking up a HL7 / FHIR example project. Native mode was not working OOTB. I had to manually register some classes for reflection.

Maybe we should cover them in the extension so this is done automatically.

jamesnetherton commented 1 month ago

Turns out the tests have been masking potential issues. The build time generated FhirContext is explicitly set on the FHIR data formats.

https://github.com/apache/camel-quarkus/blob/main/integration-tests/fhir/src/main/java/org/apache/camel/quarkus/component/fhir/it/AbstractFhirRouteBuilder.java#L69-L75

We likely need to find a way to do this automatically. E.g if the FhirVersion option is R5 - then resolve the 'R5' named FhirContext bean from the registry etc.