forked from Open-EO/openeo-processes
-
Notifications
You must be signed in to change notification settings - Fork 4
/
array_append.json
69 lines (69 loc) · 1.89 KB
/
array_append.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
"id": "array_append",
"summary": "Append a value to an array",
"description": "Appends a new value to the end of the array, which may also include a new label for labeled arrays.",
"categories": [
"arrays"
],
"parameters": [
{
"name": "data",
"description": "An array.",
"schema": {
"type": "array",
"items": {
"description": "Any data type is allowed."
}
}
},
{
"name": "value",
"description": "Value to append to the array.",
"schema": {
"description": "Any data type is allowed."
}
},
{
"name": "label",
"description": "If the given array is a labeled array, a new label for the new value should be given. If not given or `null`, the array index as string is used as the label. If in any case the label exists, a `LabelExists` exception is thrown.",
"optional": true,
"default": null,
"schema": {
"type": [
"string",
"null"
]
}
}
],
"returns": {
"description": "The new array with the value being appended.",
"schema": {
"type": "array",
"items": {
"description": "Any data type is allowed."
}
}
},
"exceptions": {
"LabelExists": {
"message": "An array element with the specified label already exists."
}
},
"examples": [
{
"arguments": {
"data": [
1,
2
],
"value": 3
},
"returns": [
1,
2,
3
]
}
]
}