Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-19636

Add support for jslt-action kamelet

XMLWordPrintable

    • Icon: Feature Feature
    • Resolution: Done
    • Icon: Major Major
    • camel-k-1.10
    • camel-k-1.8.1
    • Camel-K

      Motivation

      We need support for the template language jslt to transform/modify JSON data that comes in/out. It is very handy in KameletBindings where we would support transformations of JSON data using jslt-action because currently we require the correct format between data sources and data sinks.

      Expected outcomes

      https://camel.apache.org/camel-kamelets/0.8.x/jslt-action.html 

       

      Example of JSLT template:

       

      {
          "channel":"C03Q0ENEGAU",
          "text":"*"+.from.first_name+"@telegram*: "+.text
      } 

       

       

      Example of KameletBinding which use jslt-action:

       

      source:
          ref:
            kind: Kamelet
            apiVersion: camel.apache.org/v1
            name: telegram-source
          properties:
            authorizationToken: "{{secret:stage1/telegram.token}}"
       
        steps:
        - ref:
            kind: Kamelet
            apiVersion: camel.apache.org/v1
            name: jslt-action
          properties:
            template: t2s.jslt 

       

       

      Preliminary analysis:

       

      Tests:

              rhn-support-tasato Tadayoshi Sato
              ibek1@redhat.com Ivo Bek
              Lucie Krejcirova Lucie Krejcirova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: