Skip to content

Commit 07f4d98

Browse files
committed
POEM support array result
1 parent 7fdc246 commit 07f4d98

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<!--
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
-->
19+
# Title
20+
21+
Currently, openwhisk supports return json object only, e.g.
22+
```shell
23+
# wsk action invoke hello -r
24+
{
25+
"greeting": "Hello stranger!"
26+
}
27+
```
28+
It is necessary to support return array, e.g.
29+
```shell
30+
# wsk action invoke hello-array -r
31+
[
32+
"a",
33+
"b"
34+
]
35+
```
36+
37+
# Status
38+
* Current state: In-progress
39+
* Author(s): @ningyougang
40+
41+
# Summary and Motivation
42+
43+
This POEM proposes a new feature that allows user to write their own action which supports array result.
44+
So the result will support object and array both in future.
45+
46+
# Proposed changes
47+
## Openwhisk main repo
48+
Make controller and invoker support array result both.
49+
50+
## Runtime repos
51+
All runtime images should support array result. e.g.
52+
53+
* nodejs
54+
* go
55+
* java
56+
* python
57+
* php
58+
* shell
59+
* docker
60+
* ruby
61+
* dotnet
62+
* rust
63+
* swift
64+
65+
## Openwhisk-cli repo
66+
* When use wsk to execute action, need to support parse array result.
67+
* When use wsk to get activation, need to support parse array result as well.

0 commit comments

Comments
 (0)