-
Notifications
You must be signed in to change notification settings - Fork 2
/
extension.schema.json
414 lines (412 loc) · 11.5 KB
/
extension.schema.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/Alfresco/alfresco-content-app/blob/development/extension.schema.json",
"title": "ACA Extension Schema",
"description": "Provides a validation schema for ACA extensions",
"definitions": {
"ruleRef": {
"type": "object",
"required": ["id", "type"],
"properties": {
"id": {
"description": "Unique rule definition id",
"type": "string"
},
"type": {
"description": "Rule evaluator type",
"type": "string"
},
"parameters": {
"description": "Rule evaluator parameters",
"type": "array",
"items": { "$ref": "#/definitions/ruleParameter" },
"minItems": 1
}
}
},
"ruleParameter": {
"type": "object",
"required": ["type", "value"],
"properties": {
"type": {
"description": "Rule parameter type",
"type": "string"
},
"value": {
"description": "Rule parameter value",
"type": "string"
},
"parameters": {
"description": "Parameters",
"type": "array",
"items": { "$ref": "#/definitions/ruleParameter" },
"minItems": 1
}
}
},
"routeRef": {
"type": "object",
"required": ["id", "path", "component"],
"properties": {
"id": {
"description": "Unique route reference identifier.",
"type": "string"
},
"path": {
"description": "Route path to register.",
"type": "string"
},
"component": {
"description": "Unique identifier for the Component to use with the route.",
"type": "string"
},
"layout": {
"description": "Unique identifier for the custom layout component to use.",
"type": "string"
},
"auth": {
"description": "List of the authentication guards to use with the route.",
"type": "array",
"items": {
"type": "string"
},
"minLength": 1,
"uniqueItems": true
},
"data": {
"description": "Custom data to pass to the activated route so that your components can access it",
"type": "object"
}
}
},
"actionRef": {
"type": "object",
"required": ["id", "type"],
"properties": {
"id": {
"description": "Unique action identifier",
"type": "string"
},
"type": {
"description": "Action type",
"type": "string"
},
"payload": {
"description": "Action payload value (string or expression)",
"type": "string"
}
}
},
"contentActionRef": {
"type": "object",
"required": ["id"],
"properties": {
"id": {
"description": "Unique action identifier.",
"type": "string"
},
"type": {
"description": "Element type",
"type": "string",
"enum": ["default", "button", "separator", "menu", "custom"]
},
"title": {
"description": "Element title",
"type": "string"
},
"description": {
"description": "Element description, used for the tooltips.",
"type": "string"
},
"description-disabled": {
"description": "Description to use when element is in the disabled state.",
"type": "string"
},
"order": {
"description": "Element order",
"type": "number"
},
"icon": {
"description": "Element icon",
"type": "string"
},
"disabled": {
"description": "Toggles disabled state",
"type": "boolean"
},
"component": {
"description": "Custom component id (requires type to be 'custom')",
"type": "string"
},
"children": {
"description": "Child entries for the container types.",
"type": "array",
"items": { "$ref": "#/definitions/contentActionRef" },
"minItems": 1
},
"actions": {
"description": "Element actions",
"type": "object",
"properties": {
"click": {
"description": "Action reference for the click handler",
"type": "string"
}
}
},
"rules": {
"description": "Element rules",
"type": "object",
"properties": {
"enabled": {
"description": "Rule to evaluate the enabled state",
"type": "string"
},
"visible": {
"description": "Rule to evaluate the visibility state",
"type": "string"
}
}
}
}
},
"navBarLinkRef": {
"type": "object",
"required": ["id", "icon", "title", "route"],
"properties": {
"id": {
"description": "Unique identifier",
"type": "string"
},
"icon": {
"description": "Element icon",
"type": "string"
},
"title": {
"description": "Element title",
"type": "string"
},
"route": {
"description": "Route reference identifier",
"type": "string"
},
"description": {
"description": "Element description or tooltip",
"type": "string"
},
"order": {
"description": "Element order",
"type": "number"
},
"disabled": {
"description": "Toggles the disabled state",
"type": "boolean"
}
}
},
"navBarGroupRef": {
"type": "object",
"required": ["id", "items"],
"properties": {
"id": {
"description": "Unique identifier for the navigation group",
"type": "string"
},
"items": {
"description": "Navigation group items",
"type": "array",
"items": { "$ref": "#/definitions/navBarLinkRef" },
"minItems": 1
},
"order": {
"description": "Group order",
"type": "number"
},
"disabled": {
"description": "Toggles the disabled state",
"type": "boolean"
}
}
},
"sidebarTabRef": {
"type": "object",
"required": ["id", "component"],
"properties": {
"id": {
"description": "Unique identifier for the navigation group",
"type": "string"
},
"title": {
"description": "Element title",
"type": "string"
},
"component": {
"description": "Component id",
"type": "string"
},
"icon": {
"description": "Material icon name",
"type": "string"
},
"disabled": {
"description": "Toggles disabled state",
"type": "boolean"
},
"order": {
"description": "Element order",
"type": "number"
},
"rules": {
"description": "Element rules",
"type": "object",
"properties": {
"visible": {
"description": "Rule to evaluate the visibility state",
"type": "string"
}
}
}
}
},
"viewerExtensionRef": {
"type": "object",
"required": ["id", "component", "fileExtension"],
"properties": {
"id": {
"description": "Unique identifier for the navigation group",
"type": "string"
},
"component": {
"description": "Component id",
"type": "string"
},
"fileExtension": {
"description": "Target file extension",
"type": "string"
},
"order": {
"description": "Group order",
"type": "number"
},
"disabled": {
"description": "Toggles the disabled state",
"type": "boolean"
}
}
}
},
"type": "object",
"required": ["$name", "$version"],
"properties": {
"$name": {
"description": "Extension name",
"type": "string"
},
"$version": {
"description": "Extension version",
"type": "string"
},
"$description": {
"description": "Brief description on what the extension does"
},
"$references": {
"description": "References to external files",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"uniqueItems": true
},
"rules": {
"description": "List of rule definitions",
"type": "array",
"items": { "$ref": "#/definitions/ruleRef" },
"minItems": 1
},
"routes": {
"description": "List of custom application routes",
"type": "array",
"items": { "$ref": "#/definitions/routeRef" },
"minItems": 1
},
"actions": {
"description": "List of action definitions",
"type": "array",
"items": { "$ref": "#/definitions/actionRef" },
"minItems": 1
},
"features": {
"description": "Application-specific features and extensions",
"type": "object",
"properties": {
"header": {
"description": "Application header extensions",
"type": "array",
"items": { "$ref": "#/definitions/contentActionRef" },
"minItems": 1
},
"create": {
"description": "The [New] menu component extensions",
"type": "array",
"items": { "$ref": "#/definitions/contentActionRef" },
"minItems": 1
},
"viewer": {
"description": "Viewer component extensions",
"type": "object",
"properties": {
"openWith": {
"description": "The [Open With] menu extensions",
"type": "array",
"items": { "$ref": "#/definitions/contentActionRef" },
"minItems": 1
},
"toolbarMoreMenu": {
"description": "Toolbar entries from the More actions menu",
"type": "array",
"items": { "$ref": "#/definitions/contentActionRef" },
"minItems": 1
},
"toolbarActions": {
"description": "Toolbar entries from outside the More menu",
"type": "array",
"items": { "$ref": "#/definitions/contentActionRef" },
"minItems": 1
},
"content": {
"description": "Viewer content extensions",
"type": "array",
"items": { "$ref": "#/definitions/viewerExtensionRef" },
"minItems": 1
}
}
},
"navbar": {
"description": "Navigation bar extensions",
"type": "array",
"items": { "$ref": "#/definitions/navBarGroupRef" },
"minItems": 1
},
"sidebar": {
"description": "Sidebar extensions",
"type": "array",
"items": { "$ref": "#/definitions/sidebarTabRef" },
"minItems": 1
},
"toolbar": {
"description": "Toolbar entries",
"type": "array",
"items": { "$ref": "#/definitions/contentActionRef" },
"minItems": 1
},
"contextMenu": {
"description": "Context menu entries",
"type": "array",
"items": { "$ref": "#/definitions/contentActionRef" },
"minItems": 1
}
}
}
}
}