apache / apache/camel-karavan

Camel 4.8 - List of supported functions in the simple language

Open
#1,361 2 comments 0 reactions 0 assignees View on GitHub
designer
Dominant language
TypeScript
Stars
594
Forks
215
Avg merge
5d 11h
Merged PRs (30d)
2

Description

### Describe the solution you'd like

https://issues.apache.org/jira/browse/CAMEL-20569

In simple.json there is a new functions that list all the functions you can do on simple. Here is a snippet for the prettyBody function

```
"prettyBody": { "index": 1, "kind": "function", "displayName": "Pretty Body", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the body to a String, and attempts to pretty print if JSon or XML; otherwise the body is returned as the String value.", "suffix": "}" },
```

One more aspect is that some functions allow to do "OGNL" ala groovy, where you use DOT method DOT method to call sub methods. If the function allows this then `ognl: true` would be in the json file.

For example the body function allows this so you can do
```
${body.customer.address.country}
```

Also notice I added prefix and suffix in the json so you know that the function requires to have this - ie ${body} vs body

### Variant

Both

### Container Management (if applicable)

None

### Operating System (for VS Code Extension)

None

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading simple.json and the entry point that consumes its function metadata in Camel Karavan. Compare the existing function entries with the requested prettyBody example and verify that supported functions expose their descriptions, prefixes, suffixes, and OGNL capability where applicable; done means the list and metadata are available in the extension as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.