This is an automated email from the ASF dual-hosted git repository.
Croway pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new c1799d165bf7 Clarify consumes behavior in REST DSL auto binding mode
c1799d165bf7 is described below
commit c1799d165bf7faf3df40bc35d8b0f218c3774139
Author: Croway <[email protected]>
AuthorDate: Fri May 15 10:46:38 2026 +0200
Clarify consumes behavior in REST DSL auto binding mode
---
docs/user-manual/modules/ROOT/pages/rest-dsl.adoc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/user-manual/modules/ROOT/pages/rest-dsl.adoc
b/docs/user-manual/modules/ROOT/pages/rest-dsl.adoc
index ae5d535c6a7b..1df98cf8d418 100644
--- a/docs/user-manual/modules/ROOT/pages/rest-dsl.adoc
+++ b/docs/user-manual/modules/ROOT/pages/rest-dsl.adoc
@@ -618,6 +618,8 @@ format on the classpath. By default, Camel will use
`jackson` as the data format
|`json_xml` |Binding to/from JSON and XML is enabled and requires both data
formats to be on the classpath.
|===
+IMPORTANT: In `auto` binding mode, the `consumes` option is used as a
*fallback* for format detection when the incoming request has no `Content-Type`
header (or the header does not indicate JSON or XML). It does *not* reject
requests whose `Content-Type` does not match `consumes`. For example, an
endpoint configured with `.consumes("application/json").bindingMode(auto)` will
still accept and deserialize an XML request if the client sends `Content-Type:
application/xml` and an XML-capable [...]
+
When using `camel-jaxb` for XML bindings, then
you can use the option `mustBeJAXBElement` to relax the output message
body must be a class with JAXB annotations. You can use this in