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 a775231c3402c478b4798d98417089526303456b Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Aug 16 08:58:05 2024 +0200 CAMEL-20569: camel-catalog - Markup languages which functions they support for better doc and tooling. --- .../org/apache/camel/catalog/languages/simple.json | 22 ++++++++++++++++++++++ .../camel/maven/dsl/yaml/support/Schema.java | 2 ++ 2 files changed, 24 insertions(+) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/simple.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/simple.json index 223741d6576..09b0ba79cb7 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/simple.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/simple.json @@ -20,5 +20,27 @@ "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax" }, "resultType": { "index": 2, "kind": "attribute", "displayName": "Result Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class of the result type (type from output)" }, "trim": { "index": 3, "kind": "attribute", "displayName": "Trim", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to trim the value to remove leading and trailing whitespaces and line breaks" } + }, + "functions": { + "body": { "index": 0, "kind": "function", "displayName": "Body", "group": "function", "label": "function", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message body" }, + "prettyBody": { "index": 1, "kind": "function", "displayName": "Pretty Body", "group": "function", "label": "function", "required": false, "javaType": "String", "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." }, + "bodyOneLine": { "index": 2, "kind": "function", "displayName": "Body One Line", "group": "function", "label": "function", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Converts the body to a String and removes all line-breaks, so the string is in one line." }, + "originalBody": { "index": 3, "kind": "function", "displayName": "Original Body", "group": "function", "label": "function", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The original incoming body (only available if allowUseOriginalMessage=true)." }, + "id": { "index": 4, "kind": "function", "displayName": "Id", "group": "function", "label": "function", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message id" }, + "messageTimestamp": { "index": 5, "kind": "function", "displayName": "Message Timestamp", "group": "function", "label": "function", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message timestamp (millis since epoc) that this message originates from. Some systems like JMS, Kafka, AWS have a timestamp on the event\/message that Camel received. This method returns the timestamp if a timestamp [...] + "exchangeId": { "index": 6, "kind": "function", "displayName": "Exchange Id", "group": "function", "label": "function", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange id" }, + "exchange": { "index": 7, "kind": "function", "displayName": "Exchange", "group": "function", "label": "function", "required": false, "javaType": "org.apache.camel.Exchange", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exchange" }, + "exception": { "index": 8, "kind": "function", "displayName": "Exception", "group": "function", "label": "function", "required": false, "javaType": "java.lang.Exception", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception object on the exchange (also from caught exceptions), is null if no exception present." }, + "exception.message": { "index": 9, "kind": "function", "displayName": "Exception.message", "group": "function", "label": "function", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception message (also from caught exceptions), is null if no exception present." }, + "exception.stackTrace": { "index": 10, "kind": "function", "displayName": "Exception.stack Trace", "group": "function", "label": "function", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exception stacktrace (also from caught exceptions), is null if no exception present." }, + "threadId": { "index": 11, "kind": "function", "displayName": "Thread Id", "group": "function", "label": "function", "required": false, "javaType": "long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current thread. Can be used for logging." }, + "threadName": { "index": 12, "kind": "function", "displayName": "Thread Name", "group": "function", "label": "function", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the name of the current thread. Can be used for logging." }, + "hostName": { "index": 13, "kind": "function", "displayName": "Host Name", "group": "function", "label": "function", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the local hostname (may be empty if not possible to resolve)." }, + "camelId": { "index": 14, "kind": "function", "displayName": "Camel Id", "group": "function", "label": "function", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the CamelContext" }, + "routeId": { "index": 15, "kind": "function", "displayName": "Route Id", "group": "function", "label": "function", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The route id of the current route the Exchange is being routed" }, + "fromRouteId": { "index": 16, "kind": "function", "displayName": "From Route Id", "group": "function", "label": "function", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The original route id where this exchange was created." }, + "routeGroup": { "index": 17, "kind": "function", "displayName": "Route Group", "group": "function", "label": "function", "required": false, "javaType": "String", "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." }, + "stepId": { "index": 18, "kind": "function", "displayName": "Step Id", "group": "function", "label": "function", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Returns the id of the current step the Exchange is being routed." }, + "null": { "index": 19, "kind": "function", "displayName": "Null", "group": "function", "label": "function", "required": false, "javaType": "Object", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Represents a null value" } } } diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/support/Schema.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/support/Schema.java index fab0841b324..864c83c73b7 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/support/Schema.java +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/support/Schema.java @@ -31,6 +31,8 @@ public class Schema { public ObjectNode properties; @JsonIgnore public ObjectNode exchangeProperties; + @JsonProperty + public ObjectNode functions; public Schema() { }