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

   ## Summary
   
   _Claude Code on behalf of davsclaus_
   
   [CAMEL-24961](https://issues.apache.org/jira/browse/CAMEL-24961): the body 
types of the last 13 languages, so every language in the catalog has them:
   
   - datasonnet, hl7terser, jactl, java, js, quickjs, python, python3
   - ognl, spel, openfeature, semantic, typesafe-ai
   
   How each language reads the body and what its result is:
   
   - **As it is:** jactl, java, js, python, python3, ognl and spel read the 
body as it is, in `body` or `request.body`.
     - js and python3 turn a JavaScript object or a Python dict into a Map and 
an array or a list into a List.
     - python always gives the text of the result.
   - **A JSON copy:** quickjs reads a JSON copy of the body. Bytes become 
Base64 and a stream fails.
   - **Only some bodies:** datasonnet reads JSON, XML or CSV text only with a 
body media type. hl7terser reads an HL7 message as text, bytes, a HAPI Message 
or a DOM; a stream or a file fails.
   - **Not read:** openfeature does not read the body, and as an expression it 
gives the string value of the flag.
   - **Text, a Map or a List only:** semantic and typesafe-ai send text, a Map 
or a List. typesafe-ai always gives a Boolean.
   
   How this was checked:
   
   - Each language was checked at runtime with `camel run`, on text, bytes, a 
Map, a List, a stream, a date and no body. Evidence for every claim was read in 
the source.
   - semantic ran against a test expert and typesafe-ai against a fake of its 
API.
   - `dependsOn` only names catalog options, so the `state` of semantic and 
typesafe-ai is in the descriptions.
   
   Docs fixed:
   
   - js and python have no `this` variable.
   - ognl has no `message` variable, its root object is not the Exchange, and 
the page said MVEL.
   - spel has a `body` variable.
   - datasonnet reads JSON text only with a body media type, and needs no 
`outputMediaType` to give a Map.
   - openfeature gives the string value as an expression.
   - python gives the text of the result.
   - quickjs and typesafe-ai now say which bodies they read and give.
   
   The bugs found are in 
[CAMEL-26115](https://issues.apache.org/jira/browse/CAMEL-26115):
   
   - **datasonnet:** `source` is ignored with a null body, and `matches()` 
changes shared state.
   - **hl7terser:** a stream or a file fails with a bare NullPointerException.
   - **openfeature:** a boolean flag as an expression gives "false".
   - **ognl:** the `message` variable is missing.
   - **python:** the result is always text.
   - **quickjs:** a Set loses its values.
   - **js and python3:** returned functions, typed arrays and bytes.
   
   ## Test plan
   
   - [x] The 13 modules build, and regenerating them changes nothing more.
   - [x] The catalog copies equal the module files, and the camel-catalog tests 
pass (1103).
   - [x] The endpoint and component DSLs regenerate with no changes.
   - [x] The tests of camel-yaml-dsl-validator (295) and camel-jbang-core (2424 
+ 238) pass against the new catalog.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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