You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/08/16 12:02:09 UTC

(camel) 07/13: CAMEL-20569: camel-catalog - Markup languages which functions they support for better doc and tooling.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch lan-markup
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f8e8ab4e870f414e3062836c8f90809350f37801
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Aug 16 10:28:44 2024 +0200

    CAMEL-20569: camel-catalog - Markup languages which functions they support for better doc and tooling.
---
 .../org/apache/camel/language/simple/simple.json   | 43 ++++++++---------
 .../camel/language/simple/SimpleConstants.java     | 54 ++++++++++------------
 .../camel/maven/packaging/PackageLanguageMojo.java | 14 +++++-
 3 files changed, 57 insertions(+), 54 deletions(-)

diff --git a/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/simple/simple.json b/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/simple/simple.json
index 77a53050a85..ab4acc95bc3 100644
--- a/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/simple/simple.json
+++ b/core/camel-core-languages/src/generated/resources/META-INF/org/apache/camel/language/simple/simple.json
@@ -31,8 +31,8 @@
     "exchangeId": { "index": 6, "kind": "function", "displayName": "Exchange Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange id", "suffix": "}" },
     "exchange": { "index": 7, "kind": "function", "displayName": "Exchange", "group": "function", "label": "function", "required": false, "javaType": "org.apache.camel.Exchange", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange", "suffix": "}" },
     "exception": { "index": 8, "kind": "function", "displayName": "Exception", "group": "function", "label": "function", "required": false, "javaType": "java.lang.Exception", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception object on the exchange (also from caught exceptions), is null if no exception present.", "suffix": "}" },
-    "exception.message": { "index": 9, "kind": "function", "displayName": "Exception.message", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception message (also from caught exceptions), is null if no exception present.", "suffix": "}" },
-    "exception.stackTrace": { "index": 10, "kind": "function", "displayName": "Exception.stack Trace", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception stacktrace (also from caught exceptions), is null if no exception present.", "suffix": "}" },
+    "exception.message": { "index": 9, "kind": "function", "displayName": "Exception Message", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception message (also from caught exceptions), is null if no exception present.", "suffix": "}" },
+    "exception.stackTrace": { "index": 10, "kind": "function", "displayName": "Exception Stacktrace", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception stacktrace (also from caught exceptions), is null if no exception present.", "suffix": "}" },
     "threadId": { "index": 11, "kind": "function", "displayName": "Thread Id", "group": "function", "label": "function", "required": false, "javaType": "long", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current thread. Can be used for logging.", "suffix": "}" },
     "threadName": { "index": 12, "kind": "function", "displayName": "Thread Name", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the name of the current thread. Can be used for logging.", "suffix": "}" },
     "hostName": { "index": 13, "kind": "function", "displayName": "Host Name", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the local hostname (may be empty if not possible to resolve).", "suffix": "}" },
@@ -42,28 +42,25 @@
     "routeGroup": { "index": 17, "kind": "function", "displayName": "Route Group", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the route group of the current route the Exchange is being routed. Not all routes have a group assigned, so this may be null.", "suffix": "}" },
     "stepId": { "index": 18, "kind": "function", "displayName": "Step Id", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current step the Exchange is being routed.", "suffix": "}" },
     "null": { "index": 19, "kind": "function", "displayName": "Null", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Represents a null value", "suffix": "}" },
-    "messageAs(type)": { "index": 20, "kind": "function", "displayName": "Message As(type)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message to the given type (classname).", "suffix": "}" },
-    "bodyAs(type)": { "index": 21, "kind": "function", "displayName": "Body As(type)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname).", "suffix": "}" },
-    "mandatoryBodyAs(type)": { "index": 22, "kind": "function", "displayName": "Mandatory Body As(type)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname). If the body is null then the function will fail with an exception", "suffix": "}" },
-    "headerAs(key,type)": { "index": 23, "kind": "function", "displayName": "Header As(key,type)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message header to the given type (classname).", "suffix": "}" },
+    "messageAs(type)": { "index": 20, "kind": "function", "displayName": "Message As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message to the given type (classname).", "suffix": "}" },
+    "bodyAs(type)": { "index": 21, "kind": "function", "displayName": "Body As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname).", "suffix": "}" },
+    "mandatoryBodyAs(type)": { "index": 22, "kind": "function", "displayName": "Mandatory Body As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message body to the given type (classname). If the body is null then the function will fail with an exception", "suffix": "}" },
+    "headerAs(key,type)": { "index": 23, "kind": "function", "displayName": "Header As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the message header to the given type (classname).", "suffix": "}" },
     "headers": { "index": 24, "kind": "function", "displayName": "Headers", "group": "function", "label": "function", "required": false, "javaType": "java.util.Map", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns all the message headers in a Map", "suffix": "}" },
-    "variableAs(key,type)": { "index": 25, "kind": "function", "displayName": "Variable As(key,type)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the variable to the given type (classname).", "suffix": "}" },
+    "variableAs(key,type)": { "index": 25, "kind": "function", "displayName": "Variable As", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the variable to the given type (classname).", "suffix": "}" },
     "variables": { "index": 26, "kind": "function", "displayName": "Variables", "group": "function", "label": "function", "required": false, "javaType": "java.util.Map", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns all the variables from the current Exchange in a Map", "suffix": "}" },
-    "jq(exp)": { "index": 27, "kind": "function", "displayName": "Jq(exp)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JQ language, for example, to extract data from the message body (in JSon format). This requires having camel-jq JAR on the classpath.", "suffix": "}" },
-    "jq(input,exp)": { "index": 28, "kind": "function", "displayName": "Jq(input,exp)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JQ language, for example, to extract data from the message body (in JSon format). This requires having camel-jq JAR on the classpath. For input, you can [...]
-    "jsonpath(exp)": { "index": 29, "kind": "function", "displayName": "Jsonpath(exp)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JSonPath language, for example, to extract data from the message body (in JSon format). This requires having camel-jsonpath JAR on the classpath.", "suf [...]
-    "jsonpath(input,exp)": { "index": 30, "kind": "function", "displayName": "Jsonpath(input,exp)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JSonPath language, for example, to extract data from the message body (in JSon format). This requires having camel-jsonpath JAR on the class [...]
-    "xpath(exp)": { "index": 31, "kind": "function", "displayName": "Xpath(exp)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with XML data, then this allows using the XPath language, for example, to extract data from the message body (in XML format). This requires having camel-xpath JAR on the classpath.", "suffix": "}" },
-    "xpath(input,exp)": { "index": 32, "kind": "function", "displayName": "Xpath(input,exp)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with XML data, then this allows using the XPath language, for example, to extract data from the message body (in XML format). This requires having camel-xpath JAR on the classpath. For inpu [...]
-    "sys.name": { "index": 33, "kind": "function", "displayName": "Sys.name", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The JVM system property with the given name", "suffix": "}" },
-    "env.name": { "index": 34, "kind": "function", "displayName": "Env.name", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The OS environment variable with the given name", "suffix": "}" },
-    "pretty(exp)": { "index": 35, "kind": "function", "displayName": "Pretty(exp)", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the expression to a String, and attempts to pretty print if JSon or XML, otherwise the expression is returned as the String value.", "suffix": "}" },
-    "date(command)": { "index": 36, "kind": "function", "displayName": "Date(command)", "group": "function", "label": "function", "required": false, "javaType": "java.util.Date", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates to a java.util.Date object. Supported commands are: `now` for current timestamp, `exchangeCreated` for the timestamp when the current exchange was created, `header.xxx` to use the Long\/Date [...]
-    "date-with-timezone(command:timezone:pattern)": { "index": 37, "kind": "function", "displayName": "Date-with-timezone(command:timezone:pattern)", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Formats the date to a String using the given date pattern, and with support for timezone. Supported commands are: `now` for current timestamp, `ex [...]
-    "bean(name.method)": { "index": 38, "kind": "function", "displayName": "Bean(name.method)", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Calls a Java bean. The name of the bean can also refer to a class name using type prefix as follows `bean:type:com.foo.MyClass`. If no method name is given then Camel will automatic attempt to find th [...]
-    "propertiesExist:key": { "index": 39, "kind": "function", "displayName": "Properties Exist:key", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Checks whether a property placeholder with the given key exists or not. The result can be negated by prefixing the key with !", "suffix": "}" },
-    "properties:key:default": { "index": 40, "kind": "function", "displayName": "Properties:key:default", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lookup a property placeholder with the given key. If the key does not exist nor has a value, then an optional default value can be specified.", "suffix": "}" },
-    "ref:name": { "index": 41, "kind": "function", "displayName": "Ref:name", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To look up a bean from the Registry with the given name.", "suffix": "}" },
-    "type:name.field": { "index": 42, "kind": "function", "displayName": "Type:name.field", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To refer to a type or field by its classname. To refer to a field, you can append .FIELD_NAME. For example, you can refer to the constant field from Exchange as: `org.apache.camel.Exchange.FILE_NAME`", "s [...]
+    "jq(input,exp)": { "index": 27, "kind": "function", "displayName": "JQ", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JQ language, for example, to extract data from the message body (in JSon format). This requires having camel-jq JAR on the classpath. For input (optional), you can [...]
+    "jsonpath(input,exp)": { "index": 28, "kind": "function", "displayName": "JSonPath", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with JSon data, then this allows using the JSonPath language, for example, to extract data from the message body (in JSon format). This requires having camel-jsonpath JAR on the classpath. For i [...]
+    "xpath(input,exp)": { "index": 29, "kind": "function", "displayName": "XPath", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "When working with XML data, then this allows using the XPath language, for example, to extract data from the message body (in XML format). This requires having camel-xpath JAR on the classpath. For input (optional [...]
+    "sys.name": { "index": 30, "kind": "function", "displayName": "JVM System Property", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The JVM system property with the given name", "suffix": "}" },
+    "env.name": { "index": 31, "kind": "function", "displayName": "OS Environment Variable", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The OS environment variable with the given name", "suffix": "}" },
+    "pretty(exp)": { "index": 32, "kind": "function", "displayName": "Pretty Print", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the expression to a String, and attempts to pretty print if JSon or XML, otherwise the expression is returned as the String value.", "suffix": "}" },
+    "date(command)": { "index": 33, "kind": "function", "displayName": "Parse Date", "group": "function", "label": "function", "required": false, "javaType": "java.util.Date", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Evaluates to a java.util.Date object. Supported commands are: `now` for current timestamp, `exchangeCreated` for the timestamp when the current exchange was created, `header.xxx` to use the Long\/Date ob [...]
+    "date-with-timezone(command:timezone:pattern)": { "index": 34, "kind": "function", "displayName": "Date Formatter", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Formats the date to a String using the given date pattern, and with support for timezone. Supported commands are: `now` for current timestamp, `exchangeCreated` for the timesta [...]
+    "bean(name.method)": { "index": 35, "kind": "function", "displayName": "Call Java Bean", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Calls a Java bean. The name of the bean can also refer to a class name using type prefix as follows `bean:type:com.foo.MyClass`. If no method name is given then Camel will automatic attempt to find the b [...]
+    "propertiesExist:key": { "index": 36, "kind": "function", "displayName": "Property Placeholder Exists", "group": "function", "label": "function", "required": false, "javaType": "boolean", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Checks whether a property placeholder with the given key exists or not. The result can be negated by prefixing the key with !", "suffix": "}" },
+    "properties:key:default": { "index": 37, "kind": "function", "displayName": "Property Placeholder", "group": "function", "label": "function", "required": false, "javaType": "String", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Lookup a property placeholder with the given key. If the key does not exist nor has a value, then an optional default value can be specified.", "suffix": "}" },
+    "ref:name": { "index": 38, "kind": "function", "displayName": "Bean By Id", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To look up a bean from the Registry with the given name.", "suffix": "}" },
+    "type:name.field": { "index": 39, "kind": "function", "displayName": "Java Field Value", "group": "function", "label": "function", "required": false, "javaType": "Object", "prefix": "${", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "To refer to a type or field by its classname. To refer to a field, you can append .FIELD_NAME. For example, you can refer to the constant field from Exchange as: `org.apache.camel.Exchange.FILE_NAME`", " [...]
   }
 }
diff --git a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleConstants.java b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleConstants.java
index d3fa167ef75..e53479c2b67 100644
--- a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleConstants.java
+++ b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleConstants.java
@@ -50,10 +50,10 @@ public final class SimpleConstants {
               javaType = "java.lang.Exception", label = "function")
     public static final String EXCEPTION = "exception";
     @Metadata(description = "The exception message (also from caught exceptions), is null if no exception present.",
-              javaType = "String", label = "function")
+              javaType = "String", label = "function", displayName = "Exception Message")
     public static final String EXCEPTION_MESSAGE = "exception.message";
     @Metadata(description = "The exception stacktrace (also from caught exceptions), is null if no exception present.",
-              javaType = "String", label = "function")
+              javaType = "String", label = "function", displayName = "Exception Stacktrace")
     public static final String EXCEPTION_STACKTRACE = "exception.stackTrace";
     @Metadata(description = "Returns the id of the current thread. Can be used for logging.", javaType = "long",
               label = "function")
@@ -97,33 +97,26 @@ public final class SimpleConstants {
     @Metadata(description = "Returns all the variables from the current Exchange in a Map", label = "function",
               javaType = "java.util.Map")
     public static final String VARIABLES = "variables";
-    @Metadata(description = "When working with JSon data, then this allows using the JQ language, for example, to extract data from the message body (in JSon format). This requires having camel-jq JAR on the classpath.",
-              label = "function", javaType = "Object")
-    public static final String JQ = "jq(exp)";
     @Metadata(description = "When working with JSon data, then this allows using the JQ language, for example, to extract data from the message body (in JSon format). This requires having camel-jq JAR on the classpath."
-                            + " For input, you can choose `header:key`, `exchangeProperty:key` or `variable:key` to use as input for the JSon payload instead of the message body.",
-              label = "function", javaType = "Object")
-    public static final String JQ_INPUT = "jq(input,exp)";
-    @Metadata(description = "When working with JSon data, then this allows using the JSonPath language, for example, to extract data from the message body (in JSon format). This requires having camel-jsonpath JAR on the classpath.",
-              label = "function", javaType = "Object")
-    public static final String JSONPATH = "jsonpath(exp)";
+                            + " For input (optional), you can choose `header:key`, `exchangeProperty:key` or `variable:key` to use as input for the JSon payload instead of the message body.",
+              label = "function", javaType = "Object", displayName = "JQ")
+    public static final String JQ = "jq(input,exp)";
     @Metadata(description = "When working with JSon data, then this allows using the JSonPath language, for example, to extract data from the message body (in JSon format). This requires having camel-jsonpath JAR on the classpath."
-                            + " For input, you can choose `header:key`, `exchangeProperty:key` or `variable:key` to use as input for the JSon payload instead of the message body.",
-              label = "function", javaType = "Object")
-    public static final String JSONPATH_INPUT = "jsonpath(input,exp)";
-    @Metadata(description = "When working with XML data, then this allows using the XPath language, for example, to extract data from the message body (in XML format). This requires having camel-xpath JAR on the classpath.",
-              label = "function", javaType = "Object")
-    public static final String XPATH = "xpath(exp)";
+                            + " For input (optional), you can choose `header:key`, `exchangeProperty:key` or `variable:key` to use as input for the JSon payload instead of the message body.",
+              label = "function", javaType = "Object", displayName = "JSonPath")
+    public static final String JSONPATH = "jsonpath(input,exp)";
     @Metadata(description = "When working with XML data, then this allows using the XPath language, for example, to extract data from the message body (in XML format). This requires having camel-xpath JAR on the classpath."
-                            + " For input, you can choose `header:key`, `exchangeProperty:key` or `variable:key` to use as input for the XML payload instead of the message body.",
-              label = "function", javaType = "Object")
-    public static final String XPATH_INPUT = "xpath(input,exp)";
-    @Metadata(description = "The JVM system property with the given name", label = "function", javaType = "Object")
+                            + " For input (optional), you can choose `header:key`, `exchangeProperty:key` or `variable:key` to use as input for the XML payload instead of the message body.",
+              label = "function", javaType = "Object", displayName = "XPath")
+    public static final String XPATH = "xpath(input,exp)";
+    @Metadata(description = "The JVM system property with the given name", label = "function", javaType = "Object",
+              displayName = "JVM System Property")
     public static final String SYS = "sys.name";
-    @Metadata(description = "The OS environment variable with the given name", label = "function", javaType = "Object")
+    @Metadata(description = "The OS environment variable with the given name", label = "function", javaType = "Object",
+              displayName = "OS Environment Variable")
     public static final String ENV = "env.name";
     @Metadata(description = "Converts the expression to a String, and attempts to pretty print if JSon or XML, otherwise the expression is returned as the String value.",
-              label = "function", javaType = "String")
+              label = "function", javaType = "String", displayName = "Pretty Print")
     public static final String PRETTY = "pretty(exp)";
     @Metadata(description = "Evaluates to a java.util.Date object."
                             + " Supported commands are: `now` for current timestamp,"
@@ -133,7 +126,7 @@ public final class SimpleConstants {
                             + " `exchangeProperty.xxx` to use the Long/Date object in the exchange property with the key xxx."
                             + " `file` for the last modified timestamp of the file (available with a File consumer)."
                             + " Command accepts offsets such as: `now-24h` or `header.xxx+1h` or even `now+1h30m-100`.",
-              label = "function", javaType = "java.util.Date")
+              label = "function", javaType = "java.util.Date", displayName = "Parse Date")
     public static final String DATE = "date(command)";
     @Metadata(description = "Formats the date to a String using the given date pattern, and with support for timezone."
                             + " Supported commands are: `now` for current timestamp,"
@@ -143,24 +136,25 @@ public final class SimpleConstants {
                             + " `exchangeProperty.xxx` to use the Long/Date object in the exchange property with the key xxx."
                             + " `file` for the last modified timestamp of the file (available with a File consumer)."
                             + " Command accepts offsets such as: `now-24h` or `header.xxx+1h` or even `now+1h30m-100`.",
-              label = "function", javaType = "String")
+              label = "function", javaType = "String", displayName = "Date Formatter")
     public static final String DATE_WITH_TIMEZONE = "date-with-timezone(command:timezone:pattern)";
     @Metadata(description = "Calls a Java bean."
                             + " The name of the bean can also refer to a class name using type prefix as follows `bean:type:com.foo.MyClass`."
                             + " If no method name is given then Camel will automatic attempt to find the best method to use.",
-              label = "function", javaType = "Object")
+              label = "function", javaType = "Object", displayName = "Call Java Bean")
     public static final String BEAN = "bean(name.method)";
     @Metadata(description = "Checks whether a property placeholder with the given key exists or not. The result can be negated by prefixing the key with !",
-              label = "function", javaType = "boolean")
+              label = "function", javaType = "boolean", displayName = "Property Placeholder Exists")
     public static final String PROPERTIES_EXIST = "propertiesExist:key";
     @Metadata(description = "Lookup a property placeholder with the given key. If the key does not exist nor has a value, then an optional default value can be specified.",
-              label = "function", javaType = "String")
+              label = "function", javaType = "String", displayName = "Property Placeholder")
     public static final String PROPERTIES = "properties:key:default";
-    @Metadata(description = "To look up a bean from the Registry with the given name.", label = "function", javaType = "Object")
+    @Metadata(description = "To look up a bean from the Registry with the given name.", label = "function", javaType = "Object",
+              displayName = "Bean By Id")
     public static final String REF = "ref:name";
     @Metadata(description = "To refer to a type or field by its classname. To refer to a field, you can append .FIELD_NAME. For example, you can refer to the"
                             + " constant field from Exchange as: `org.apache.camel.Exchange.FILE_NAME`",
-              label = "function", javaType = "Object")
+              label = "function", javaType = "Object", displayName = "Java Field Value")
     public static final String TYPE = "type:name.field";
 
 }
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
index ab2c062d58b..9535b311415 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
@@ -315,7 +315,19 @@ public class PackageLanguageMojo extends AbstractGeneratorMojo {
         String displayName = metadata.displayName();
         // compute a display name if we don't have anything
         if (Strings.isNullOrEmpty(displayName)) {
-            displayName = Strings.asTitle(fun.getName());
+            displayName = fun.getName();
+            int pos = displayName.indexOf('(');
+            if (pos == -1) {
+                pos = displayName.indexOf(':');
+            }
+            if (pos == -1) {
+                pos = displayName.indexOf('.');
+            }
+            if (pos != -1) {
+                displayName = displayName.substring(0, pos);
+            }
+            displayName = displayName.replace('-', ' ');
+            displayName = Strings.asTitle(displayName);
         }
         fun.setDisplayName(displayName);
         fun.setJavaType(metadata.javaType());