davsclaus commented on pull request #2831:
URL: https://github.com/apache/camel-k/pull/2831#issuecomment-994678764


   > The problem I see by remove the inline variant is that sometime is very 
verbose and not very intuitive, take as example the expressions block
   > 
   > With XML, you can write something like:
   > 
   > ```
   > <simple>${foo.bar}<simple>
   > ```
   > 
   > As today you can write something like:
   > 
   > ```yaml
   > simple: "${foo.bar}"
   > ```
   > 
   > Which seems nice and inline with the XML DSL, but removing the 
polymorphism would lead to:
   > 
   > ```yaml
   > simple: 
   >   expression: "${foo.bar}"
   > ```
   > 
   > Which to me seems to be not very intuitive and verbose.
   > 
   > In some cases, having only the inlined option may be ok, but if you have 
to also support additional options then, you cant express it in YAML because 
YAML does not have the same element and attribute concept as XML
   
   Luca you have a point here about the languages. However its rare you need to 
configure languages with options - especially simple language. The jsonpath 
language however do have a few options that can be handy, such as 
suppressException and writeAsString.
   https://camel.apache.org/components/3.13.x/languages/jsonpath-language.html
   
   I wonder if we can make this into a camel quasi uri, where you can then say
   
   ```
   jsonpath: $.store.book[?(@.price &lt; 30)]?suppressException=true
   ```
   
   So what we do is to check if the string ends with known query parameters, eg 
in this case suppressException is a known parameter.
   
   


-- 
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