Skip to content

Commit 234ad54

Browse files
authored
Merge pull request #6 from openconnectivityfoundation/fix-jakarta
fix dali resource for jakarta
2 parents da633fd + c24c9ec commit 234ad54

File tree

1 file changed

+71
-52
lines changed

1 file changed

+71
-52
lines changed

dali.swagger.json

+71-52
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"swagger": "2.0",
33
"info": {
4-
"title": "DALI Configuration",
5-
"version": "2021-08-03",
4+
"title": "Dali",
5+
"version": "2021-02-19",
66
"license": {
77
"name": "OCF Data Model License",
88
"url": "https://github.com/openconnectivityfoundation/core/blob/e28a9e0a92e17042ba3e83661e4c0fbce8bdc4ba/LICENSE.md",
@@ -14,52 +14,53 @@
1414
"consumes": ["application/json"],
1515
"produces": ["application/json"],
1616
"paths": {
17-
"/daliconf" : {
17+
"/dali" : {
1818
"get": {
19-
"description": "This Resource describes a DALI (addressing) configuration, IEC 62386-104, Digital addressable lighting interface - Part 104: General requirements - Wireless and alternative wired system.\n",
19+
"description": "This Resource describes the DALI write resource, able to convey FF and BF according IEC 62386-104, Digital addressable lighting interface - Part 104: General requirements - Wireless and alternative wired system.\nRetrieve on this Resource only returns common Properties.\n",
2020
"parameters": [
21-
{"$ref": "#/parameters/interface"}
21+
{"$ref": "#/parameters/interface-baseline"}
2222
],
2323
"responses": {
2424
"200": {
2525
"description" : "",
2626
"x-example":
2727
{
28-
"rt": ["oic.r.dali.conf"],
29-
"if": ["oic.if.rw","oic.if.baseline"],
30-
"bus": 2,
31-
"src": 5,
32-
"ver": 2
28+
"rt": ["oic.r.dali"],
29+
"if": ["oic.if.baseline", "oic.if.w"]
3330
},
34-
"schema": { "$ref": "#/definitions/Response" }
31+
"schema": { "$ref": "#/definitions/Dali" }
3532
}
3633
}
3734
},
3835
"post": {
39-
"description": "The POST can be used to set the bus identification or to issue an DALI FF frame. The command can be issued as Multicast (SSM) or as unicast. The Multicast command will have no response, the unicast command can have a BF response.",
36+
"description": "The POST can be used to issue an DALI FF frame. The command can be issued as Multicast (SSM) or as unicast. The Multicast command will have no response. The unicast command can have a BF response.",
4037
"parameters": [
4138
{"$ref": "#/parameters/interface"},
4239
{
4340
"name": "body",
4441
"in": "body",
4542
"required": true,
46-
"schema": { "$ref": "#/definitions/Request" },
43+
"schema": { "$ref": "#/definitions/Dali_command" },
4744
"x-example":
4845
{
49-
"bus": 3
46+
"prio" : 1,
47+
"tbus": [2, 3],
48+
"pld": [3, 5, 6],
49+
"pld_s": 3
5050
}
5151
}
5252
],
5353
"responses": {
5454
"200": {
55-
"description" : "The BF response of a unicast command",
55+
"description" : "The BF response of a unicast command, not required",
5656
"x-example":
5757
{
58-
"bus": 3,
59-
"src": 5,
60-
"ver": 2
58+
"prio" : 1,
59+
"tbus": [2, 3],
60+
"pld": [3, 5, 6],
61+
"pld_s": 3
6162
},
62-
"schema": { "$ref": "#/definitions/Response" }
63+
"schema": { "$ref": "#/definitions/Dali_command" }
6364
}
6465
}
6566
}
@@ -70,29 +71,22 @@
7071
"in": "query",
7172
"name": "if",
7273
"type": "string",
73-
"enum": ["oic.if.rw","oic.if.baseline"]
74+
"enum": ["oic.if.baseline","oic.if.w"]
75+
},
76+
"interface-baseline" : {
77+
"in": "query",
78+
"name": "if",
79+
"type": "string",
80+
"enum": ["oic.if.baseline"]
7481
}
7582
},
7683
"definitions": {
77-
"Request": {
78-
"properties": {
79-
"bus": {
80-
"description": "assign the bus identifier.",
81-
"type": "integer"
82-
},
83-
"src": {
84-
"description": "assigned source address. -1 means not yet assigned by the Application controller.",
85-
"type": "integer"
86-
}
87-
},
88-
"type": "object"
89-
},
90-
"Response": {
84+
"Dali": {
9185
"properties": {
9286
"rt": {
9387
"description": "The Resource Type.",
9488
"items": {
95-
"enum": ["oic.r.dali.conf"],
89+
"enum": ["oic.r.dali"],
9690
"maxLength": 64,
9791
"type": "string"
9892
},
@@ -101,31 +95,18 @@
10195
"readOnly": true,
10296
"type": "array"
10397
},
104-
"bus": {
105-
"description": "The assigned bus identifier.",
106-
"type": "integer"
107-
},
108-
"src": {
109-
"description": "assigned source address. -1 means not yet assigned by the Application controller.",
110-
"type": "integer"
111-
},
112-
"ver": {
113-
"description": "version of dali on the device.",
114-
"type": "integer",
115-
"enum": [1, 2]
116-
},
11798
"n": {
11899
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/n"
119100
},
120101
"id": {
121102
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/id"
122103
},
123104
"if": {
124-
"description": "The OCF Interface set supported by this Resource. rw as default interface.",
105+
"description": "The OCF Interface set supported by this Resource.",
125106
"items": {
126107
"enum": [
127-
"oic.if.rw",
128-
"oic.if.baseline"
108+
"oic.if.baseline",
109+
"oic.if.w"
129110
],
130111
"type": "string"
131112
},
@@ -135,8 +116,46 @@
135116
"type": "array"
136117
}
137118
},
119+
"type": "object"
120+
},
121+
"Dali_command": {
122+
"properties": {
123+
"prio": {
124+
"description": "The priority of the command.",
125+
"type": "integer",
126+
"default": 0
127+
},
128+
"st": {
129+
"description": "The command has to be send twice.",
130+
"type": "boolean",
131+
"default" : false
132+
},
133+
"pld_s": {
134+
"description": "The amount of integers in the Dali payload.",
135+
"type": "integer"
136+
},
137+
"pld": {
138+
"description": "Each DALI byte is conveyed as an byte",
139+
"items": {
140+
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.types-schema.json#/definitions/uint8"
141+
},
142+
"type": "array"
143+
},
144+
"tbus": {
145+
"description": "The set of bus identifiers to which the command should be applied.",
146+
"items": {
147+
"type": "integer"
148+
},
149+
"type": "array",
150+
"default" : [ 0 ]
151+
},
152+
"src": {
153+
"description": "assigned source address. -1 means not yet assigned by the Application controller.",
154+
"type": "integer"
155+
}
156+
},
138157
"type": "object",
139-
"required": ["ver"]
158+
"required": ["pld", "pld_s"]
140159
}
141160
}
142161
}

0 commit comments

Comments
 (0)