Skip to content

Commit e5aeeac

Browse files
compress json scheme
1 parent e7c166f commit e5aeeac

File tree

2 files changed

+66
-259
lines changed

2 files changed

+66
-259
lines changed

tests/acceptance/features/apiOcm/listPermissions.feature

+26-179
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ Feature: List a federated sharing permissions
4343
"oneOf":[
4444
{
4545
"type": "object",
46-
"required": [
47-
"grantedToV2",
48-
"id",
49-
"roles"
50-
],
46+
"required": ["grantedToV2","id","roles"],
5147
"properties": {
5248
"grantedToV2": {
5349
"type": "object",
@@ -57,24 +53,14 @@ Feature: List a federated sharing permissions
5753
"type": "object",
5854
"required": ["@libre.graph.userType","displayName","id"],
5955
"properties": {
60-
"@libre.graph.userType": {
61-
"const": "Federated"
62-
},
63-
"id": {
64-
"type": "string",
65-
"pattern": "^%federated_user_id_pattern%$"
66-
},
67-
"displayName": {
68-
"const": "Brian Murphy"
69-
}
56+
"@libre.graph.userType": {"const": "Federated"},
57+
"id": {"pattern": "^%federated_user_id_pattern%$"},
58+
"displayName": {"const": "Brian Murphy"}
7059
}
7160
}
7261
}
7362
},
74-
"id": {
75-
"type": "string",
76-
"pattern": "^%user_id_pattern%$"
77-
},
63+
"id": {"pattern": "^%user_id_pattern%$"},
7864
"invitation": {
7965
"type": "object",
8066
"required": ["invitedBy"],
@@ -87,16 +73,9 @@ Feature: List a federated sharing permissions
8773
"type": "object",
8874
"required": ["@libre.graph.userType", "displayName", "id"],
8975
"properties": {
90-
"@libre.graph.userType": {
91-
"const": "Member"
92-
},
93-
"id": {
94-
"type": "string",
95-
"pattern": "^%user_id_pattern%$"
96-
},
97-
"displayName": {
98-
"const": "Alice Hansen"
99-
}
76+
"@libre.graph.userType": {"const": "Member"},
77+
"id": {"pattern": "^%user_id_pattern%$"},
78+
"displayName": {"const": "Alice Hansen"}
10079
}
10180
}
10281
}
@@ -107,124 +86,7 @@ Feature: List a federated sharing permissions
10786
"type": "array",
10887
"minItems": 1,
10988
"maxItems": 1,
110-
"items": {
111-
"type": "string",
112-
"pattern": "^%role_id_pattern%$"
113-
}
114-
}
115-
}
116-
}
117-
]
118-
}
119-
}
120-
}
121-
}
122-
"""
123-
124-
125-
Scenario: user lists permissions of a resource shared to a federated user
126-
Given using server "LOCAL"
127-
And "Alice" has created the federation share invitation
128-
And using server "REMOTE"
129-
And user "Brian" has been created with default attributes
130-
And "Brian" has accepted invitation
131-
And using server "LOCAL"
132-
And user "Alice" has created folder "/uploadFolder"
133-
And user "Alice" has sent the following resource share invitation to federated user:
134-
| resource | uploadFolder |
135-
| space | Personal |
136-
| sharee | Brian |
137-
| shareType | user |
138-
| permissionsRole | Editor |
139-
When user "Alice" gets permissions list for folder "uploadFolder" of the space "Personal" using the Graph API
140-
Then the HTTP status code should be "200"
141-
And the JSON data of the response should match
142-
"""
143-
{
144-
"type": "object",
145-
"required": [
146-
"@libre.graph.permissions.actions.allowedValues",
147-
"@libre.graph.permissions.roles.allowedValues",
148-
"value"
149-
],
150-
"properties": {
151-
"value": {
152-
"type": "array",
153-
"minItems": 1,
154-
"maxItems": 1,
155-
"uniqueItems": true,
156-
"items": {
157-
"oneOf":[
158-
{
159-
"type": "object",
160-
"required": [
161-
"grantedToV2",
162-
"id",
163-
"roles"
164-
],
165-
"properties": {
166-
"grantedToV2": {
167-
"type": "object",
168-
"required": ["user"],
169-
"properties": {
170-
"user": {
171-
"type": "object",
172-
"required": ["@libre.graph.userType","displayName","id"],
173-
"properties": {
174-
"@libre.graph.userType": {
175-
"const": "Federated"
176-
},
177-
"id": {
178-
"type": "string",
179-
"pattern": "^%federated_user_id_pattern%$"
180-
},
181-
"displayName": {
182-
"const": "Brian Murphy"
183-
}
184-
}
185-
}
186-
}
187-
},
188-
"id": {
189-
"type": "string",
190-
"pattern": "^%user_id_pattern%$"
191-
},
192-
"invitation": {
193-
"type": "object",
194-
"required": ["invitedBy"],
195-
"properties": {
196-
"invitedBy": {
197-
"type": "object",
198-
"required": ["user"],
199-
"properties": {
200-
"user": {
201-
"type": "object",
202-
"required": ["@libre.graph.userType", "displayName", "id"],
203-
"properties": {
204-
"@libre.graph.userType": {
205-
"const": "Member"
206-
},
207-
"id": {
208-
"type": "string",
209-
"pattern": "^%user_id_pattern%$"
210-
},
211-
"displayName": {
212-
"const": "Alice Hansen"
213-
}
214-
}
215-
}
216-
}
217-
}
218-
}
219-
},
220-
"roles": {
221-
"type": "array",
222-
"minItems": 1,
223-
"maxItems": 1,
224-
"items": {
225-
"type": "string",
226-
"pattern": "^%role_id_pattern%$"
227-
}
89+
"items": {"pattern": "^%role_id_pattern%$"}
22890
}
22991
}
23092
}
@@ -288,24 +150,14 @@ Feature: List a federated sharing permissions
288150
"type": "object",
289151
"required": ["@libre.graph.userType","displayName","id"],
290152
"properties": {
291-
"@libre.graph.userType": {
292-
"const": "Federated"
293-
},
294-
"id": {
295-
"type": "string",
296-
"pattern": "^%federated_user_id_pattern%$"
297-
},
298-
"displayName": {
299-
"const": "Brian Murphy"
300-
}
153+
"@libre.graph.userType": {"const": "Federated"},
154+
"id": {"pattern": "^%federated_user_id_pattern%$"},
155+
"displayName": {"const": "Brian Murphy"}
301156
}
302157
}
303158
}
304159
},
305-
"id": {
306-
"type": "string",
307-
"pattern": "^%user_id_pattern%$"
308-
},
160+
"id": { "pattern": "^%user_id_pattern%$" },
309161
"invitation": {
310162
"type": "object",
311163
"required": ["invitedBy"],
@@ -318,14 +170,9 @@ Feature: List a federated sharing permissions
318170
"type": "object",
319171
"required": ["@libre.graph.userType", "displayName", "id"],
320172
"properties": {
321-
"@libre.graph.userType": {
322-
"const": "Member"
323-
},
324-
"id": {
325-
"type": "string",
326-
"pattern": "^%user_id_pattern%$"
327-
},
328-
"displayName": { "const": "Alice Hansen" }
173+
"@libre.graph.userType": {"const": "Member"},
174+
"id": {"pattern": "^%user_id_pattern%$"},
175+
"displayName": {"const": "Alice Hansen"}
329176
}
330177
}
331178
}
@@ -336,7 +183,7 @@ Feature: List a federated sharing permissions
336183
"type": "array",
337184
"minItems": 1,
338185
"maxItems": 1,
339-
"items": { "pattern": "^%role_id_pattern%$" }
186+
"items": {"pattern": "^%role_id_pattern%$"}
340187
}
341188
}
342189
}
@@ -386,7 +233,7 @@ Feature: List a federated sharing permissions
386233
"oneOf":[
387234
{
388235
"type": "object",
389-
"required": ["grantedToV2", "id", "roles"],
236+
"required": ["grantedToV2","id","roles"],
390237
"properties": {
391238
"grantedToV2": {
392239
"type": "object",
@@ -396,14 +243,14 @@ Feature: List a federated sharing permissions
396243
"type": "object",
397244
"required": ["@libre.graph.userType","displayName","id"],
398245
"properties": {
399-
"@libre.graph.userType": { "const": "Federated" },
400-
"id": { "pattern": "^%federated_user_id_pattern%$" },
401-
"displayName": { "const": "Brian Murphy" }
246+
"@libre.graph.userType": {"const": "Federated"},
247+
"id": {"pattern": "^%federated_user_id_pattern%$"},
248+
"displayName": {"const": "Brian Murphy"}
402249
}
403250
}
404251
}
405252
},
406-
"id": { "pattern": "^%user_id_pattern%$" },
253+
"id": {"pattern": "^%user_id_pattern%$"},
407254
"invitation": {
408255
"type": "object",
409256
"required": ["invitedBy"],
@@ -416,9 +263,9 @@ Feature: List a federated sharing permissions
416263
"type": "object",
417264
"required": ["@libre.graph.userType", "displayName", "id"],
418265
"properties": {
419-
"@libre.graph.userType": { "const": "Member" },
420-
"id": { "pattern": "^%user_id_pattern%$" },
421-
"displayName": { "const": "Alice Hansen" }
266+
"@libre.graph.userType": {"const": "Member"},
267+
"id": {"pattern": "^%user_id_pattern%$"},
268+
"displayName": {"const": "Alice Hansen"}
422269
}
423270
}
424271
}
@@ -429,7 +276,7 @@ Feature: List a federated sharing permissions
429276
"type": "array",
430277
"minItems": 1,
431278
"maxItems": 1,
432-
"items": { "pattern": "^%role_id_pattern%$" }
279+
"items": {"pattern": "^%role_id_pattern%$"}
433280
}
434281
}
435282
}

0 commit comments

Comments
 (0)