Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camel 4.8 - List of supported functions in the simple language #1361

Open
davsclaus opened this issue Aug 16, 2024 · 2 comments
Open

Camel 4.8 - List of supported functions in the simple language #1361

davsclaus opened this issue Aug 16, 2024 · 2 comments
Labels
designer Karavan Designer

Comments

@davsclaus
Copy link
Contributor

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

@davsclaus davsclaus added the designer Karavan Designer label Aug 16, 2024
@mgubaidullin
Copy link
Contributor

I believe we already have them in Designer

Screenshot 2024-08-16 at 10 22 13 AM

@davsclaus
Copy link
Contributor Author

okay is that something special for karavan,
for what its worth then its now detailed in camel-catalog and could source the information from there instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
designer Karavan Designer
Projects
None yet
Development

No branches or pull requests

2 participants