Croway opened a new pull request, #30285:
URL: https://github.com/apache/camel/pull/30285

   JIRA: [CAMEL-27114](https://issues.apache.org/jira/browse/CAMEL-27114)
   
   - `bindingMode` `json` or `json_xml` without a JSON data format on the 
classpath started, and every request then failed with `Cannot bind to json as 
message body is not json compatible`. `RestBindingAdviceFactory` now fails when 
it creates the route, with `JSON DataFormat jackson not found (the jackson data 
format is in camel-jackson3; add camel-jackson3 to the classpath).`, as the 
`xml` binding already did. The XML message, and the same two messages of the 
`RestProducer` binding, now name the artifact too 
(`ArtifactUtils.dataFormatHint`).
   - `bindingMode` `auto` that finds neither a JSON nor an XML data format 
binds nothing; it now logs a WARN when the route is created, naming both data 
formats and their artifacts. `auto` with one of them is unchanged, with no WARN.
   - `Cannot find RestConsumerFactory / RestProducerFactory / 
RestApiConsumerFactory in Registry or as a Component to use` now lists the 
components the Rest DSL looks for, each with its artifact (camel-platform-http 
first; camel-http first for the producer), and the option that chooses one 
(`component`, `producerComponent`). The message keeps its prefix.
   - A `component` / `producerComponent` name that is not found 
(`NoSuchBeanException`) now says which artifact to add when it is a Camel 
component, or else gives the did-you-mean and the component names the option 
takes (for example when the name of a servlet is given).
   - Docs: `rest-dsl-binding.adoc` (binding modes table, the startup failure). 
camel-openapi-java gets a `camel-jackson3` test dependency: `ComplexTypesTest` 
and `RestOpenApiV3XOfTest` declare json binding with no JSON data format, and 
now fail at startup without it.
   
   Tests: `RestFactoryNotFoundMessageTest` (camel-rest) fails 7 of 8 on main 
and passes 8 of 8 with the fix (the control with a registered factory passes on 
both). `RestBindingMissingDataFormatTest` (camel-core; its test class path has 
a stand-in `jackson`, so the missing data format is `gson` or an unknown name) 
fails 6 of 9 on main and passes 9 of 9 with the fix (controls: `auto` with a 
JSON data format does not warn, `json` with one starts, `off` with client 
request validation starts without one). Also run: the Rest tests of camel-rest 
(137), the Rest tests of camel-core (99), camel-support (186), 
camel-openapi-java (123), all green.
   
   Upgrade guide (4.24): a Rest DSL service with `bindingMode` `json` or 
`json_xml` and no JSON data format fails at startup instead of on every 
request; `auto` with no data format logs a WARN.
   
   _Claude Code on behalf of Federico Mariani_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to