-
-
Notifications
You must be signed in to change notification settings - Fork 134
Expand file tree
/
Copy pathopenapi-source.patch
More file actions
84 lines (84 loc) · 2.6 KB
/
openapi-source.patch
File metadata and controls
84 lines (84 loc) · 2.6 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
diff --git a/OpenHABCore/Sources/OpenHABCore/openapi/openapi.json b/OpenHABCore/Sources/OpenHABCore/openapi/openapi.json
index a0b77670..da93fcb2 100644
--- a/OpenHABCore/Sources/OpenHABCore/openapi/openapi.json
+++ b/OpenHABCore/Sources/OpenHABCore/openapi/openapi.json
@@ -2962,6 +2962,14 @@
"summary": "Sends a command to an item.",
"operationId": "sendItemCommand",
"parameters": [
+ {
+ "name": "X-OpenHAB-Source",
+ "in": "header",
+ "description": "the source of the command; takes priority over the query parameter or JSON body if multiple are set",
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "itemname",
"in": "path",
@@ -2971,14 +2979,32 @@
"pattern": "[a-zA-Z_0-9]+",
"type": "string"
}
+ },
+ {
+ "name": "source",
+ "in": "query",
+ "description": "the source of the command",
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {
- "description": "valid item command (e.g. ON, OFF, UP, DOWN, REFRESH)",
+ "description": "Valid item command (e.g., ON, OFF) either as plain text or JSON",
"content": {
"text/plain": {
"schema": {
- "type": "string"
+ "type": "string",
+ "example": "ON"
+ }
+ },
+ "application/json": {
+ "schema": {
+ "type": "string",
+ "example": {
+ "value": "ON",
+ "source": "org.openhab.ios"
+ }
}
}
},
@@ -3209,6 +3235,14 @@
"type": "string"
}
},
+ {
+ "name": "X-OpenHAB-Source",
+ "in": "header",
+ "description": "the source of the event; takes priority over the query parameter or JSON body if multiple are set",
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "itemname",
"in": "path",
@@ -3218,6 +3252,14 @@
"pattern": "[a-zA-Z_0-9]+",
"type": "string"
}
+ },
+ {
+ "name": "source",
+ "in": "query",
+ "description": "the source of the event",
+ "schema": {
+ "type": "string"
+ }
}
],
"requestBody": {