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

   # Description
   
   Part of [CAMEL-23832](https://issues.apache.org/jira/browse/CAMEL-23832). 
The umbrella ticket stays open.
   
   ## Summary
   
   This PR rewrites 10 texts of jsonata: the component description, 3 component 
options (contentCache,
   allowTemplateFromHeader, frameBinding), 5 endpoint options (outputType, 
inputType, frameBinding,
   allowTemplateFromHeader, prettyPrint) and the CamelJsonataResourceUri header.
   
   The old header text called the value only a URI. The producer also uses it 
as the JSONata expression itself when
   it has no resource scheme, reads it only with allowTemplateFromHeader, and 
removes it after use. The old component
   option texts did not say that they are the defaults of the endpoint options. 
The frameBinding texts did not say that
   the binding is called with the `Jsonata.Frame` of each evaluation, or that 
the endpoint falls back to the component
   binding. The texts now say that prettyPrint applies only to JsonString 
output. The options of the shared
   `ResourceEndpoint` (resourceUri, contentCache and allowContextMapAll on the 
endpoint) are not changed.
   
   Sources: `JsonataEndpoint`, `JsonataComponent`, `JsonataConstants`, 
`ResourceEndpoint` and `ResourceHelper` in
   camel-support, and the `com.dashjoin:jsonata` 0.9.10 library 
(`Jsonata.Frame.bind`).
   
   ### Found, not changed
   
   - `allowContextMapAll` (inherited from `ResourceEndpoint`) does nothing in 
jsonata: the component never builds a
     context map, so the option and its "security risk" text do not apply here.
   - `JsonataConstants.JSONATA_CONTEXT` (`CamelJsonataContext`) is set by 
several tests, but the producer never reads
     it.
   - When the CamelJsonataResourceUri header replaces the expression, the 
producer has already opened the resource of
     the endpoint and does not close that stream (it leaks one when 
contentCache=false).
   - The expression is parsed again for each exchange, also with 
contentCache=true: the cache keeps only the text of
     the resource.
   
   ## Tests
   
   - There is no new test, as only description text changes.
   - A script compared the component JSON with the parent commit: only 
`description` fields changed (10 texts).
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I ran the formatter and built the module, then regenerated the catalog 
copy, `dsl/camel-endpointdsl` and `dsl/camel-componentdsl`, and committed all 
generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 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