davsclaus commented on code in PR #26732:
URL: https://github.com/apache/camel/pull/26732#discussion_r4069857305


##########
dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/main/java/org/apache/camel/dsl/yaml/validator/SchemaHints.java:
##########
@@ -230,6 +236,13 @@ static Error apply(List<Hint> table, Error error, 
YamlValidator validator) {
                         return eip + " holds its EIPs under steps: " + eip + 
": {steps: [- log: \"...\"]}"
                                + (eip.equals("doCatch") ? ", each - doCatch: 
item with exception: and steps:" : "");
                     }),
+            // setBody: {constant: null} to clear the body before a GET: 
constant is a text (CAMEL-24888)
+            append("type", ".*/constant(/expression)?", m -> 
m.message().contains("null found"),
+                    m -> "constant is a text; to set an empty body (a GET 
sends none) write setBody: {simple:"
+                         + " {expression: \"${null}\"}}"),
+            // library: jackson: the enumeration is case sensitive
+            append("enum", ".*/library", ANY,
+                    m -> "the library name is case sensitive: write library: 
Jackson (or Gson, Fastjson, Jsonb)"),

Review Comment:
   Good catch, the row fired for every `library` property with json's list. It 
now takes the entry of the data format's own enumeration (from the error's 
message) that matches the written value ignoring case: `library: jackson` says 
"write library: Jackson", `avro: {library: apacheavro}` says "write library: 
ApacheAvro", and with no such entry it says "case sensitive, write it as 
listed" and leaves the schema's list to speak. Test added for the avro case 
(its enumeration is ApacheAvro/Jackson).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to