rabbah commented on a change in pull request #2848: Support reading param.json
from stdin #2837
URL:
https://github.com/apache/incubator-openwhisk/pull/2848#discussion_r145799109
##########
File path: docs/actions.md
##########
@@ -202,6 +202,39 @@ Parameters can be passed to the action when it is invoked.
"payload": "Hello, Bernie from Vermont"
}
```
+4. It is possible to pipe JSON parameters to the `wsk` command by using the
special filename `-` with `--params-file` or `-P`:
+
+ ```
+ cat parameters.json | envsubst | wsk action invoke -r hello -P -
+ ```
+
+ This example uses `envsubst` to replace environment variables in the JSON
before passing them to the action invocation.
Review comment:
OK - I was going for simpler example but after your explanation it's good to
have a real use case.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services