flogo icon indicating copy to clipboard operation
flogo copied to clipboard

Variadic arguments in function descriptors

Open fcastill opened this issue 7 years ago • 0 comments

Looking at the functions descriptors in project-flogo I've noticed the varArgs is specified at the function level and not at the argument level. Take for example the string.concat descriptor in strings:

{
  "name": "string.concat",
  "description": "concatenate a set of string",
  "varArgs": true,
  "args": [
   {
     "name ": "str",
     "type": "string"
   }
  ]
}

Is this a restriction of the flogo functions or can we move the varArgs flag to the argument to describe functions with a signature like: func somefunc(required: int, optional: ...int)?

Proposal of changes:

 {
   "name": "concat",
   "description": "concatenate a set of strings",
-  "varArgs": true,
   "args": [
    {
      "name ": "str",
      "type": "string"
+     "varArg": true // variadic?
    }
   ]
 }

fcastill avatar Feb 22 '19 18:02 fcastill