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

   ## Summary
   
   Improve the DataSonnet language integration to make it more ergonomic for 
Camel users:
   
   - **New CML functions** — null handling (`cml.defaultVal`, `cml.isEmpty`), 
type coercion (`cml.toInteger`, `cml.toDecimal`, `cml.toBoolean`), date/time 
(`cml.now`, `cml.nowFmt`, `cml.formatDate`, `cml.parseDate`), and utilities 
(`cml.uuid`, `cml.typeOf`)
   - **`camel.libsonnet` standard library** — auto-discovered helper functions 
for strings (capitalize, trim, split, join, contains, startsWith, endsWith, 
replace, lower, upper), collections (sum, sumBy, first, last, count, distinct, 
flatMap, sortBy, groupBy, min, max, take, drop, zip), and objects (pick, omit, 
merge, keys, values, entries, fromEntries)
   - **Documentation** — full reference for all new functions and the standard 
library in the component docs
   
   All new functions are implemented through DataSonnet's existing `Library` 
SPI — no parser or grammar changes required.
   
   ## Test plan
   
   - [x] `CmlFunctionsTest` — 28 tests covering all new CML functions (null 
handling, type coercion, date/time, utilities, combined usage with body data)
   - [x] `CamelLibsonnetTest` — 11 tests covering the `camel.libsonnet` 
standard library (string ops, collection ops, object ops, combined 
transformation with body data)
   - [x] All 65 existing + new tests pass locally


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