You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Mariia Lukianets (Jira)" <ji...@apache.org> on 2022/06/13 09:33:00 UTC

[jira] [Created] (SLING-11391) Sling Pipes to support Output paramenter with hyphen

Mariia Lukianets created SLING-11391:
----------------------------------------

             Summary: Sling Pipes to support Output paramenter with hyphen
                 Key: SLING-11391
                 URL: https://issues.apache.org/jira/browse/SLING-11391
             Project: Sling
          Issue Type: Improvement
          Components: pipes
            Reporter: Mariia Lukianets


h4. Background

It's not possible to output a variable containing a hyphen, like 'api-type'.
{code:java}
pipe -u user:password \
-c \
-o apiType=content["api-type"] \
pipe.txt {code}
The 'apiType' will output empty value and in the logs pipe writes an error
{code:java}
Caused by: org.apache.commons.jexl3.JexlException$Variable: org.apache.sling.pipes.internal.bindings.JxltEngine.parse@1:15 undefined variable api
    at org.apache.sling.pipes.internal.bindings.JxltEngine.parse(JxltEngine.java:41)
    at org.apache.sling.pipes.PipeBindings.internalEvaluate(PipeBindings.java:253)
    at org.apache.sling.pipes.PipeBindings.evaluate(PipeBindings.java:234)
    ... 162 common frames omitted {code}
 

According to the [docu|https://people.apache.org/~henrib/jexl-3.0/reference/syntax.html] "JEXL does not support variables with hyphens in them, e.g.". Seems like this is the cause for the issue.

[https://github.com/apache/sling-org-apache-sling-pipes/blob/master/src/main/java/org/apache/sling/pipes/internal/PlumberImpl.java#L661] 

 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)