Skip to content

Commit 01a7839

Browse files
authored
Merge pull request #44 from openconnectivityfoundation/CR3514-simplegrouping
intial commit for groups resource
2 parents e97e678 + e9f1a21 commit 01a7839

File tree

1 file changed

+124
-0
lines changed

1 file changed

+124
-0
lines changed

swagger2.0/oic.r.grouping.json

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "Grouping",
5+
"version": "2021-07-15",
6+
"license": {
7+
"name": "OCF Data Model License",
8+
"url": "https://github.com/openconnectivityfoundation/core/blob/e28a9e0a92e17042ba3e83661e4c0fbce8bdc4ba/LICENSE.md",
9+
"x-copyright": "Copyright 2021 Open Connectivity Foundation, Inc. All rights reserved."
10+
},
11+
"termsOfService": "https://openconnectivityfoundation.github.io/core/DISCLAIMER.md"
12+
},
13+
"schemes": ["http"],
14+
"consumes": ["application/json"],
15+
"produces": ["application/json"],
16+
"paths": {
17+
"/groupsResURI" : {
18+
"get": {
19+
"description": "The Resource to set groups to which the device belongs. To be used in conjunction with SSM (Simple Secure Multicast).",
20+
"parameters": [
21+
{"$ref": "#/parameters/interface-all"}
22+
],
23+
"responses": {
24+
"200": {
25+
"description" : "",
26+
"x-example": {
27+
"rt": ["oic.r.groups"],
28+
"groups": []
29+
},
30+
"schema": { "$ref": "#/definitions/groups" }
31+
}
32+
}
33+
},
34+
"post": {
35+
"description": "sets all groups",
36+
"parameters": [
37+
{"$ref": "#/parameters/interface-rw"},
38+
{
39+
"name": "body",
40+
"in": "body",
41+
"required": true,
42+
"schema": { "$ref": "#/definitions/groups" },
43+
"x-example": {
44+
"groups": [ 2, 5]
45+
}
46+
}
47+
],
48+
"responses": {
49+
"200": {
50+
"description" : "",
51+
"x-example": {
52+
"rt": ["oic.r.groups"],
53+
"groups": [ 2, 5]
54+
},
55+
"schema": { "$ref": "#/definitions/groups" }
56+
}
57+
}
58+
}
59+
}
60+
},
61+
"parameters": {
62+
"interface-rw" : {
63+
"in" : "query",
64+
"name" : "if",
65+
"type" : "string",
66+
"enum" : ["oic.if.rw"]
67+
},
68+
"interface-all" : {
69+
"in" : "query",
70+
"name" : "if",
71+
"type" : "string",
72+
"enum" : ["oic.if.rw", "oic.if.baseline"]
73+
}
74+
},
75+
"definitions": {
76+
"groups" : {
77+
"properties": {
78+
"groups" : {
79+
"description": "list of group identifiers to which the device belongs to, empty means not belonging to a group.",
80+
"items": {
81+
"type": "integer"
82+
},
83+
"readOnly": false,
84+
"type": "array"
85+
},
86+
"rt" : {
87+
"description": "Resource Type of the Resource",
88+
"items": {
89+
"enum": ["oic.r.groups"],
90+
"type": "string",
91+
"maxLength": 64
92+
},
93+
"minItems": 1,
94+
"uniqueItems": true,
95+
"readOnly": true,
96+
"type": "array"
97+
},
98+
"id" : {
99+
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/id"
100+
},
101+
"n" : {
102+
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/n"
103+
},
104+
"if" : {
105+
"description": "The OCF Interfaces supported by this Resource",
106+
"items": {
107+
"enum": [
108+
"oic.if.rw",
109+
"oic.if.baseline"
110+
],
111+
"type": "string",
112+
"maxLength": 64
113+
},
114+
"minItems": 1,
115+
"readOnly": true,
116+
"uniqueItems": true,
117+
"type": "array"
118+
}
119+
},
120+
"type" : "object",
121+
"required": ["groups"]
122+
}
123+
}
124+
}

0 commit comments

Comments
 (0)