BBloggsbott / ready-to-serve

A backend server for people who don't want to write backend code.
Apache License 2.0
2 stars 1 forks source link

Daisy Chain Plugins #12

Open BBloggsbott opened 3 years ago

BBloggsbott commented 3 years ago

Allow users to Daisy Chain result of one plugin as input to another.

BBloggsbott commented 3 years ago

Proposed plugin config schema for daisy-chaining plugins

version: 2.0
jars:
    - id: sum
      jarfile: helloworld.jar
      method: com.bbloggsbott.helloworld.HelloWorld.getSum
      args:
          - name: a
            type: int
            requestParam: true
          - name: b
            type: int
            requestParam: true
      returns: int
    - id: sqrt
      jarfile: helloworld.jar
      method: com.bbloggsbott.helloworld.HelloWorld.getSqrt
      args:
          - name: a
            type: int

chains:
    - name: sum_and_sqrt
      steps:
          - id: sum
          - id: sqrt

endpoints:
    - sum_and_sqrt: /sum_sqrt
    - sum: /sum
    - sqrt: /sqrt

@jaikanthjay46 , Thoughts?