atiaomar1978-hub opened a new pull request, #25368:
URL: https://github.com/apache/camel/pull/25368

   # Description
   
   Adds optional `argSchema` endpoint option to `camel-ai-tool` for declaring 
complex nested tool parameters as raw JSON Schema instead of flat `parameter.*` 
options.
   
   **Key changes:**
   - New `argSchema` `@UriParam` on `AiToolConfiguration` (inline JSON or 
`classpath:`/`file:`/`resource:` reference)
   - `argSchema` and `parameter.*` are mutually exclusive (validated at 
consumer start)
   - Raw schema stored verbatim in `AiToolSpec.parametersJsonSchema`; executor 
allowlist/required names derived from top-level `properties`/`required` keys
   - LangChain4j adapter converts nested schemas via 
`JsonSchemaElementJsonUtils.fromMap()` with metadata stripping fallback
   - Startup validation: root object, non-empty properties, valid `required` 
array, required names must exist in properties
   - Documentation, catalog sync, and AssertJ tests
   
   Fixes [CAMEL-24334](https://issues.apache.org/jira/browse/CAMEL-24334).
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   - [x] JIRA issue filed: CAMEL-24334
   
   # 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 have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-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.
   
   _AI-generated on behalf of atiaomar1978-hub via Cursor Cloud Agent._
   
   # Testing
   
   ```
   ./mvnw -B -pl 
components/camel-ai/camel-ai-tool,components/camel-ai/camel-langchain4j-agent 
-am test \
     
-Dtest=AiToolParameterHelperTest,AiToolExecutorTest,AiToolEndpointLifecycleTest,AiToolSpecToLangChain4jTest
   ```
   
   All tests pass.


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