This is an automated email from the ASF dual-hosted git repository. ningyougang pushed a commit to branch poem-support-array-result in repository https://gitbox.apache.org/repos/asf/openwhisk.git
commit 057dfeafdaad203eec7922eb07a0929f7f2216f5 Author: ning.yougang <[email protected]> AuthorDate: Tue May 24 16:59:22 2022 +0800 POEM support array result --- proposals/POEM-support-array-result.md | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/proposals/POEM-support-array-result.md b/proposals/POEM-support-array-result.md new file mode 100644 index 000000000..6e1d43dd4 --- /dev/null +++ b/proposals/POEM-support-array-result.md @@ -0,0 +1,53 @@ +<!-- +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--> +# Title + +Currently, openwhisk supports return json object only, e.g. +```shell +# wsk action invoke hello -r +{ + "greeting": "Hello stranger!" +} +``` +It is necessary to support return array, e.g. +```shell +# wsk action invoke hello-array -r +[ + "a", + "b" +] +``` + +## Status +* Current state: In-progress +* Author(s): @ningyougang + +## Summary and Motivation + +This POEM proposes a new feature that allows user to write their own action which supports array result. +So the result will support object and array both in future. + +## Proposed changes +### Openwhisk repo +Make controller and invoker support array result both. +### Runtime repo +Includes java, php, python, etc. All runtime images should supoprt array result. +### Openwhisk-cli repo +When use wsk execute action, need to support parse array result. +When use wsk get activation, need to support parse array result as well.
