apache / apache/openwhisk-wskdeploy
Validate parameter declarations on Trigger are compatible to Action when Rule exists
- Dominant language
- Go
- Stars
- 75
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
If a Rule binds a Trigger to an Action, we should validate that the input parameters (names and types) are compatible with the Action they are being associated with.
1) emit WARNING (i.e., ParameterTypeMismatch) if name matches, but type does not
- NOTE: I thought about making this an ERROR, but the Action may perform type conversion (or treat values as "string"s always).
2) emit a WARNING of name exists on trigger, but not on Action.
For example:
```
actions:
hello_world_triggerrule:
function: src/hello_plus.js
runtime: nodejs
inputs:
name: string
place: string
children: integer
height: float
outputs:
greeting: string
details: string
triggers:
meetPerson:
inputs:
name: string
place: string
children: integer
height: integer
rules:
meetPersonRule:
trigger: meetPerson
action: hello_world_triggerrule
```
would not have a WARNING for type mismatch on the parameter "height".
Contributor guide
Assessment
This issue has not been assessed yet.