[
https://issues.apache.org/jira/browse/CAMEL-28063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guillaume Nodet reassigned CAMEL-28063:
---------------------------------------
Assignee: Guillaume Nodet
> camel-fhir - onInstance, throwError and extraParameters bugs found while
> checking the API descriptions
> ------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-28063
> URL: https://issues.apache.org/jira/browse/CAMEL-28063
> Project: Camel
> Issue Type: Bug
> Components: camel-fhir
> Reporter: Claus Ibsen
> Assignee: Guillaume Nodet
> Priority: Minor
> Fix For: 4.25.0
>
>
> h4. 1. operation/onInstance calls onInstanceVersion
> FhirOperation.onInstance (camel-fhir-api FhirOperation.java:135) calls
> client.operation().onInstanceVersion(id), the same as onInstanceVersion.
> HAPI's onInstance strips the version (toVersionless()), so with a versioned
> id the operation runs on that version instead of on the resource. Proposed
> change: call onInstance(id).
> h4. 2. read with ifVersionMatches: throwError=false still throws
> FhirRead.java:323 checks throwError != null, so throwError=false still calls
> throwNotModifiedException(). Proposed change: check
> Boolean.TRUE.equals(throwError).
> h4. 3. extraParameters values are cast without type conversion
> ExtraParameters.java:113 and following cast the values directly ((Boolean),
> (String[]), ...). A header such as CamelFhir.encodeJson with the String
> "true" (normal from YAML/XML routes) fails with ClassCastException. Proposed
> change: convert with the CamelContext TypeConverter to the expected type.
> Found while writing the API method and parameter descriptions of CAMEL-27980
> (https://github.com/apache/camel/pull/31273).
> _Filed by Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)