Scott Chapman reported that the inputs/params are not deleted while updating 
action even the inputs are deleted from deployment file, I wrote a simple test 
case:

manifest.yaml:

```
packages:
  default:
      actions:
        hello:
          code: |
                function main(params) {
                    msg = "Hello, " + params.name + " from " + params.place;
                    console.log(msg)
                    return { payload:  msg };
                }
          inputs:
             name:
               type: string
               description: name of a person
             place:
               type: string
               description: location of a person
          runtime: nodejs:6
```

deployment.yaml:

```
packages:
  default:
      actions:
        hello:
          inputs:
             name: Amy
             place: New York
```

This creates an action with two params.

```
    "parameters": [
        {
            "key": "name",
            "value": "Amy"
        },
        {
            "key": "place",
            "value": "New York"
        }
    ],
```

After one param is deleted from manifest and deployment, action is updated and 
now it shows only one input.

```
    "parameters": [
        {
            "key": "name",
            "value": "Amy"
        }
    ],
```

After deleting the entire inputs section from manifest and deployment files, 
action still shows one param associated with it.


```
    "parameters": [
        {
            "key": "name",
            "value": "Amy"
        }
    ],
```

`wskdeploy` sends body in request:

```
Req Body
{"name":"helloNodejsWithCode","exec":{"kind":"nodejs:6","code":"function 
main(params) {\n    msg = \"Hello, \" + params.name + \" from \" + 
params.place;\n    console.log(msg)\n    return { payload:  msg 
};\n}\n"},"publish":false}
```



[ Full content available at: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/986 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to