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

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


The following commit(s) were added to refs/heads/main by this push:
     new 9cc8cec3c8e6 camel-core-languages: toPrettyJson and toPrettyJsonBody 
are described as the plain toJson functions (#29953)
9cc8cec3c8e6 is described below

commit 9cc8cec3c8e60531c61989f2152e13e31f34f338
Author: dhairya05 <[email protected]>
AuthorDate: Sun Nov 15 01:06:46 2026 +0530

    camel-core-languages: toPrettyJson and toPrettyJsonBody are described as 
the plain toJson functions (#29953)
    
    … as the plain toJson functions
    
    The four JSon output functions come in two pairs, but both halves of
    each pair carried the same @Metadata description:
    
      toPrettyJson(exp)  "Converts the expression to JSon String 
representation."
      toJson(exp)        "Converts the expression to JSon String 
representation."
      toPrettyJsonBody   "Converts the body to JSon String representation."
      toJsonBody         "Converts the body to JSon String representation."
    
    So simple.json, which is what tooling and editor completion read, gives
    no way to tell the pretty variants from the plain ones; only the
    displayName hints at it. OutputFunctionFactory builds the pretty pair
    with toJsonExpression(inlined, true) against false for the plain pair,
    and simple-functions.adoc already says "in pretty mode" for them.
    
    Say so in the description of both pretty functions.
---
 .../resources/org/apache/camel/catalog/languages/simple.json          | 4 ++--
 .../resources/META-INF/org/apache/camel/language/simple/simple.json   | 4 ++--
 .../main/java/org/apache/camel/language/simple/SimpleConstants.java   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

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 275238721c07..f21c5dd1b32f 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
@@ -144,8 +144,8 @@
     "pretty(exp)": { "index": 108, "kind": "function", "displayName": "Pretty 
Print", "group": "xml", "label": "json,xml", "required": false, "javaType": 
"String", "prefix": "${", "deprecated": false, "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.", "ognl": false, "suffix": "}", "params": [ { "name": "exp", "javaType": 
"Object", "required": fal [...]
     "prettyBody": { "index": 109, "kind": "function", "displayName": "Pretty 
Body", "group": "xml", "label": "json,xml", "required": false, "javaType": 
"String", "prefix": "${", "deprecated": false, "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.", 
"ognl": false, "suffix": "}" },
     "sort(exp,reverse)": { "index": 110, "kind": "function", "displayName": 
"Sort", "group": "collection", "label": "collection", "required": false, 
"javaType": "List", "prefix": "${", "deprecated": false, "autowired": false, 
"secret": false, "description": "Sorts the message body or expression in 
natural order", "ognl": false, "suffix": "}", "params": [ { "name": "exp", 
"javaType": "Object", "required": false, "defaultValue": "body", "description": 
"The expression. When omitted uses the [...]
-    "toPrettyJson(exp)": { "index": 111, "kind": "function", "displayName": 
"To Pretty JSon", "group": "json", "label": "json", "required": false, 
"javaType": "String", "prefix": "${", "deprecated": false, "autowired": false, 
"secret": false, "description": "Converts the expression to JSon String 
representation.", "ognl": false, "suffix": "}", "params": [ { "name": "exp", 
"javaType": "Object", "required": false, "defaultValue": "body", "description": 
"The expression. When omitted uses th [...]
-    "toPrettyJsonBody": { "index": 112, "kind": "function", "displayName": "To 
Pretty JSon Body", "group": "json", "label": "json", "required": false, 
"javaType": "String", "prefix": "${", "deprecated": false, "autowired": false, 
"secret": false, "description": "Converts the body to JSon String 
representation.", "ognl": false, "suffix": "}" },
+    "toPrettyJson(exp)": { "index": 111, "kind": "function", "displayName": 
"To Pretty JSon", "group": "json", "label": "json", "required": false, 
"javaType": "String", "prefix": "${", "deprecated": false, "autowired": false, 
"secret": false, "description": "Converts the expression to pretty printed JSon 
String representation.", "ognl": false, "suffix": "}", "params": [ { "name": 
"exp", "javaType": "Object", "required": false, "defaultValue": "body", 
"description": "The expression. When  [...]
+    "toPrettyJsonBody": { "index": 112, "kind": "function", "displayName": "To 
Pretty JSon Body", "group": "json", "label": "json", "required": false, 
"javaType": "String", "prefix": "${", "deprecated": false, "autowired": false, 
"secret": false, "description": "Converts the body to pretty printed JSon 
String representation.", "ognl": false, "suffix": "}" },
     "toJson(exp)": { "index": 113, "kind": "function", "displayName": "To 
JSon", "group": "json", "label": "json", "required": false, "javaType": 
"String", "prefix": "${", "deprecated": false, "autowired": false, "secret": 
false, "description": "Converts the expression to JSon String representation.", 
"ognl": false, "suffix": "}", "params": [ { "name": "exp", "javaType": 
"Object", "required": false, "defaultValue": "body", "description": "The 
expression. When omitted uses the message bod [...]
     "toJsonBody": { "index": 114, "kind": "function", "displayName": "To JSon 
Body", "group": "json", "label": "json", "required": false, "javaType": 
"String", "prefix": "${", "deprecated": false, "autowired": false, "secret": 
false, "description": "Converts the body to JSon String representation.", 
"ognl": false, "suffix": "}" },
     "properties:key:default": { "index": 115, "kind": "function", 
"displayName": "Property Placeholder", "group": "core", "label": "core", 
"required": false, "javaType": "String", "prefix": "${", "deprecated": false, 
"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.", "ognl": false, "suffix": "}", 
"params": [ { "name": "key", "javaType": "String [...]
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 275238721c07..f21c5dd1b32f 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
@@ -144,8 +144,8 @@
     "pretty(exp)": { "index": 108, "kind": "function", "displayName": "Pretty 
Print", "group": "xml", "label": "json,xml", "required": false, "javaType": 
"String", "prefix": "${", "deprecated": false, "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.", "ognl": false, "suffix": "}", "params": [ { "name": "exp", "javaType": 
"Object", "required": fal [...]
     "prettyBody": { "index": 109, "kind": "function", "displayName": "Pretty 
Body", "group": "xml", "label": "json,xml", "required": false, "javaType": 
"String", "prefix": "${", "deprecated": false, "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.", 
"ognl": false, "suffix": "}" },
     "sort(exp,reverse)": { "index": 110, "kind": "function", "displayName": 
"Sort", "group": "collection", "label": "collection", "required": false, 
"javaType": "List", "prefix": "${", "deprecated": false, "autowired": false, 
"secret": false, "description": "Sorts the message body or expression in 
natural order", "ognl": false, "suffix": "}", "params": [ { "name": "exp", 
"javaType": "Object", "required": false, "defaultValue": "body", "description": 
"The expression. When omitted uses the [...]
-    "toPrettyJson(exp)": { "index": 111, "kind": "function", "displayName": 
"To Pretty JSon", "group": "json", "label": "json", "required": false, 
"javaType": "String", "prefix": "${", "deprecated": false, "autowired": false, 
"secret": false, "description": "Converts the expression to JSon String 
representation.", "ognl": false, "suffix": "}", "params": [ { "name": "exp", 
"javaType": "Object", "required": false, "defaultValue": "body", "description": 
"The expression. When omitted uses th [...]
-    "toPrettyJsonBody": { "index": 112, "kind": "function", "displayName": "To 
Pretty JSon Body", "group": "json", "label": "json", "required": false, 
"javaType": "String", "prefix": "${", "deprecated": false, "autowired": false, 
"secret": false, "description": "Converts the body to JSon String 
representation.", "ognl": false, "suffix": "}" },
+    "toPrettyJson(exp)": { "index": 111, "kind": "function", "displayName": 
"To Pretty JSon", "group": "json", "label": "json", "required": false, 
"javaType": "String", "prefix": "${", "deprecated": false, "autowired": false, 
"secret": false, "description": "Converts the expression to pretty printed JSon 
String representation.", "ognl": false, "suffix": "}", "params": [ { "name": 
"exp", "javaType": "Object", "required": false, "defaultValue": "body", 
"description": "The expression. When  [...]
+    "toPrettyJsonBody": { "index": 112, "kind": "function", "displayName": "To 
Pretty JSon Body", "group": "json", "label": "json", "required": false, 
"javaType": "String", "prefix": "${", "deprecated": false, "autowired": false, 
"secret": false, "description": "Converts the body to pretty printed JSon 
String representation.", "ognl": false, "suffix": "}" },
     "toJson(exp)": { "index": 113, "kind": "function", "displayName": "To 
JSon", "group": "json", "label": "json", "required": false, "javaType": 
"String", "prefix": "${", "deprecated": false, "autowired": false, "secret": 
false, "description": "Converts the expression to JSon String representation.", 
"ognl": false, "suffix": "}", "params": [ { "name": "exp", "javaType": 
"Object", "required": false, "defaultValue": "body", "description": "The 
expression. When omitted uses the message bod [...]
     "toJsonBody": { "index": 114, "kind": "function", "displayName": "To JSon 
Body", "group": "json", "label": "json", "required": false, "javaType": 
"String", "prefix": "${", "deprecated": false, "autowired": false, "secret": 
false, "description": "Converts the body to JSon String representation.", 
"ognl": false, "suffix": "}" },
     "properties:key:default": { "index": 115, "kind": "function", 
"displayName": "Property Placeholder", "group": "core", "label": "core", 
"required": false, "javaType": "String", "prefix": "${", "deprecated": false, 
"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.", "ognl": false, "suffix": "}", 
"params": [ { "name": "key", "javaType": "String [...]
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 6712db0cdecb..3c527ab3589f 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
@@ -700,12 +700,12 @@ public final class SimpleConstants {
                       "param=reverse:boolean:optional:false:Whether to sort in 
reverse order" })
     public static final String SORT = "sort(exp,reverse)";
 
-    @Metadata(description = "Converts the expression to JSon String 
representation.",
+    @Metadata(description = "Converts the expression to pretty printed JSon 
String representation.",
               label = "json", javaType = "String", displayName = "To Pretty 
JSon",
               annotations = { "param=exp:Object:optional:body:The expression. 
When omitted uses the message body" })
     public static final String TO_PRETTY_JSON = "toPrettyJson(exp)";
 
-    @Metadata(description = "Converts the body to JSon String representation.",
+    @Metadata(description = "Converts the body to pretty printed JSon String 
representation.",
               javaType = "String", label = "json", displayName = "To Pretty 
JSon Body")
     public static final String TO_PRETTY_JSON_BODY = "toPrettyJsonBody";
 

Reply via email to