davsclaus opened a new pull request, #27581: URL: https://github.com/apache/camel/pull/27581
https://issues.apache.org/jira/browse/CAMEL-25284 Today a null body is marshalled by the data format, and the result depends on the format: JSON (Jackson) gives the text `null`, CSV an empty text, jacksonXml `<null/>`. A REST route that marshals a lookup that found nothing then answers 200 with the body `null`. The marshal EIP now has `allowNullBody` (advanced, default `false`), as unmarshal has: - `true`: a null body (or a null `variableSend`) is not marshalled, and the message is left as it is, so the body stays null. - `false` (default): unchanged, the data format marshals the null. No upgrade note needed. Changes: - `MarshalDefinition`, `MarshalReifier`, `MarshalProcessor`; `DataFormatClause.allowNullBody()` now applies to `marshal()` too. - Regenerated: XML and YAML DSL parsers/writers, the YAML DSL schemas, the XSD and the catalog. - `marshal-eip.adoc`: an "Allow Null Body" section with Java, XML and YAML. - `MarshalAllowNullBodyTest`: default marshals the null, `allowNullBody` skips it and keeps the headers, a body is still marshalled. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m -- 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]
