@camunda/zeebe-element-templates-json-schema 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.md +52 -0
- package/package.json +25 -0
- package/resources/schema.json +562 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to [@camunda/zeebe-element-templates-json-schema](https://github.com/camunda/element-templates-json-schema/packages/zeebe-element-templates-json-schema) are documented here. We use [semantic versioning](http://semver.org/) for releases.
|
|
4
|
+
|
|
5
|
+
## Unreleased
|
|
6
|
+
|
|
7
|
+
___Note:__ Yet to be released changes appear here._
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 0.1.0
|
|
11
|
+
|
|
12
|
+
* `FEAT`: initial version :tada:
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 camunda Services GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @camunda/zeebe-element-templates-json-schema
|
|
2
|
+
|
|
3
|
+
[](https://github.com/camunda/element-templates-json-schema/actions?query=workflow%3ACI)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
JSON Schema for (Zeebe) Element Templates. The schema is built on top of and validated by [`json-schema@draft-07`](https://json-schema.org/draft-07/json-schema-release-notes.html).
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
Set the `$schema` attribute to reference the [JSON Schema definition](./resources/schema.json).
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
{
|
|
15
|
+
"$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json",
|
|
16
|
+
"name": "My Service Worker",
|
|
17
|
+
"id": "com.example.ServiceWorker",
|
|
18
|
+
"appliesTo": [ "bpmn:ServiceTask" ],
|
|
19
|
+
"properties": []
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
You can also use a specific version.
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
"$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema@0.1.0/resources/schema.json"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Build and Run
|
|
30
|
+
|
|
31
|
+
Prepare the project by installing all dependencies:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
npm install
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Bundle [the source schema files](./src) together
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
npm run build
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Execute the following command to run the generated schema against the tests
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
npm run test
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT
|
|
52
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@camunda/zeebe-element-templates-json-schema",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "JSON Schema for (Zeebe) Element Templates",
|
|
5
|
+
"files": [
|
|
6
|
+
"resources"
|
|
7
|
+
],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"test": "mocha -r esm --reporter=spec --recursive test/spec",
|
|
10
|
+
"dev": "npm run test -- --watch",
|
|
11
|
+
"all": "run-s build test",
|
|
12
|
+
"build": "node ../../tasks/generate-schema.js --input=./src/schema.json --output=./resources/schema.json"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/camunda/element-templates-json-schema.git",
|
|
17
|
+
"directory": "packages/zeebe-element-templates-json-schema"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"json-schema",
|
|
21
|
+
"element-templates",
|
|
22
|
+
"camunda"
|
|
23
|
+
],
|
|
24
|
+
"license": "MIT"
|
|
25
|
+
}
|
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"$id": "http://camunda.org/schema/zeebe-element-templates/1.0",
|
|
4
|
+
"title": "Element Template Schema",
|
|
5
|
+
"description": "A single element template configuration or an array of element template configurations",
|
|
6
|
+
"definitions": {
|
|
7
|
+
"properties": {
|
|
8
|
+
"allOf": [
|
|
9
|
+
{
|
|
10
|
+
"type": "array",
|
|
11
|
+
"title": "element template properties",
|
|
12
|
+
"description": "The properties of the element template",
|
|
13
|
+
"default": [],
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"title": "element template property",
|
|
17
|
+
"description": "A property defined for the element template",
|
|
18
|
+
"default": {},
|
|
19
|
+
"allOf": [
|
|
20
|
+
{
|
|
21
|
+
"if": {
|
|
22
|
+
"properties": {
|
|
23
|
+
"type": {
|
|
24
|
+
"const": "Dropdown"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"required": [
|
|
28
|
+
"type"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"then": {
|
|
32
|
+
"required": [
|
|
33
|
+
"choices"
|
|
34
|
+
],
|
|
35
|
+
"errorMessage": "must provide choices=[] with \"Dropdown\" type"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"properties": {
|
|
40
|
+
"value": {
|
|
41
|
+
"$id": "#/properties/property/value",
|
|
42
|
+
"type": [
|
|
43
|
+
"string",
|
|
44
|
+
"boolean"
|
|
45
|
+
],
|
|
46
|
+
"title": "property value",
|
|
47
|
+
"description": "The value of the control field for the property"
|
|
48
|
+
},
|
|
49
|
+
"description": {
|
|
50
|
+
"$id": "#/properties/property/description",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"title": "property description",
|
|
53
|
+
"description": "The description of the control field"
|
|
54
|
+
},
|
|
55
|
+
"label": {
|
|
56
|
+
"$id": "#/properties/property/label",
|
|
57
|
+
"type": "string",
|
|
58
|
+
"title": "property label",
|
|
59
|
+
"description": "The label of the control field for the property"
|
|
60
|
+
},
|
|
61
|
+
"type": {
|
|
62
|
+
"$id": "#/properties/property/type",
|
|
63
|
+
"type": "string",
|
|
64
|
+
"title": "property type",
|
|
65
|
+
"description": "The type of the control field"
|
|
66
|
+
},
|
|
67
|
+
"editable": {
|
|
68
|
+
"$id": "#/properties/property/editable",
|
|
69
|
+
"type": "boolean",
|
|
70
|
+
"title": "property editable",
|
|
71
|
+
"description": "Indicates whether the property is editable or not"
|
|
72
|
+
},
|
|
73
|
+
"choices": {
|
|
74
|
+
"$id": "#/properties/property/choices",
|
|
75
|
+
"type": "array",
|
|
76
|
+
"title": "property choices",
|
|
77
|
+
"description": "The choices for dropdown properties",
|
|
78
|
+
"items": {
|
|
79
|
+
"$id": "#/properties/property/choices/item",
|
|
80
|
+
"type": "object",
|
|
81
|
+
"properties": {
|
|
82
|
+
"name": {
|
|
83
|
+
"$id": "#/properties/property/choices/item/name",
|
|
84
|
+
"type": "string",
|
|
85
|
+
"title": "choice name",
|
|
86
|
+
"description": "The name of the choice"
|
|
87
|
+
},
|
|
88
|
+
"value": {
|
|
89
|
+
"$id": "#/properties/property/choices/item/value",
|
|
90
|
+
"type": "string",
|
|
91
|
+
"title": "choice value",
|
|
92
|
+
"description": "The value of the choice"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"required": [
|
|
96
|
+
"value",
|
|
97
|
+
"name"
|
|
98
|
+
],
|
|
99
|
+
"errorMessage": "{ name, value } must be specified for \"Dropdown\" choices"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"constraints": {
|
|
103
|
+
"$id": "#/properties/property/constraints",
|
|
104
|
+
"type": "object",
|
|
105
|
+
"title": "property constraints",
|
|
106
|
+
"description": "The validation constraints",
|
|
107
|
+
"properties": {
|
|
108
|
+
"notEmpty": {
|
|
109
|
+
"$id": "#/properties/property/constraints/notEmpty",
|
|
110
|
+
"type": "boolean",
|
|
111
|
+
"title": "property constraints not empty",
|
|
112
|
+
"description": "The control field must not be empty"
|
|
113
|
+
},
|
|
114
|
+
"minLength": {
|
|
115
|
+
"$id": "#/properties/property/constraints/minLength",
|
|
116
|
+
"type": "number",
|
|
117
|
+
"title": "property constraints min length",
|
|
118
|
+
"description": "The minimal length for the control field value"
|
|
119
|
+
},
|
|
120
|
+
"maxLength": {
|
|
121
|
+
"$id": "#/properties/property/constraints/maxLength",
|
|
122
|
+
"type": "number",
|
|
123
|
+
"title": "property constraints max length",
|
|
124
|
+
"description": "The maximal length for the control field value"
|
|
125
|
+
},
|
|
126
|
+
"pattern": {
|
|
127
|
+
"$id": "#/properties/property/constraints/pattern",
|
|
128
|
+
"title": "property constraints pattern",
|
|
129
|
+
"description": "A regular expression pattern for the constraints",
|
|
130
|
+
"oneOf": [
|
|
131
|
+
{
|
|
132
|
+
"type": "object",
|
|
133
|
+
"properties": {
|
|
134
|
+
"value": {
|
|
135
|
+
"$id": "#/properties/property/constraints/pattern/value",
|
|
136
|
+
"type": "string",
|
|
137
|
+
"title": "property constraints pattern value",
|
|
138
|
+
"description": "The regular expression of the pattern constraint"
|
|
139
|
+
},
|
|
140
|
+
"message": {
|
|
141
|
+
"$id": "#/properties/property/constraints/pattern/message",
|
|
142
|
+
"type": "string",
|
|
143
|
+
"title": "property constraints pattern message",
|
|
144
|
+
"description": "The validation message of the pattern constraint"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"type": "string"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"group": {
|
|
156
|
+
"$id": "#/properties/property/group",
|
|
157
|
+
"type": "string",
|
|
158
|
+
"title": "property group",
|
|
159
|
+
"description": "The custom group of the control field for the property"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
166
|
+
"type": "array",
|
|
167
|
+
"title": "element template properties",
|
|
168
|
+
"description": "The properties of the element template",
|
|
169
|
+
"default": [],
|
|
170
|
+
"items": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"title": "element template property",
|
|
173
|
+
"description": "A property defined for the element template",
|
|
174
|
+
"default": {},
|
|
175
|
+
"required": [
|
|
176
|
+
"binding"
|
|
177
|
+
],
|
|
178
|
+
"errorMessage": {
|
|
179
|
+
"required": {
|
|
180
|
+
"binding": "missing binding for property \"${0#}\""
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"allOf": [
|
|
184
|
+
{
|
|
185
|
+
"if": {
|
|
186
|
+
"properties": {
|
|
187
|
+
"binding": {
|
|
188
|
+
"properties": {
|
|
189
|
+
"type": {
|
|
190
|
+
"const": "property"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"required": [
|
|
194
|
+
"type"
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"required": [
|
|
199
|
+
"binding"
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
"then": {
|
|
203
|
+
"properties": {
|
|
204
|
+
"type": {
|
|
205
|
+
"enum": [
|
|
206
|
+
"String",
|
|
207
|
+
"Text",
|
|
208
|
+
"Hidden",
|
|
209
|
+
"Dropdown",
|
|
210
|
+
"Boolean"
|
|
211
|
+
],
|
|
212
|
+
"errorMessage": "invalid property type ${0} for binding type \"property\"; must be any of { String, Text, Hidden, Dropdown, Boolean }"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"if": {
|
|
219
|
+
"properties": {
|
|
220
|
+
"binding": {
|
|
221
|
+
"properties": {
|
|
222
|
+
"type": {
|
|
223
|
+
"enum": [
|
|
224
|
+
"zeebe:input",
|
|
225
|
+
"zeebe:output",
|
|
226
|
+
"zeebe:taskHeader",
|
|
227
|
+
"zeebe:taskDefinition:type"
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"required": [
|
|
232
|
+
"type"
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"required": [
|
|
237
|
+
"binding"
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
"then": {
|
|
241
|
+
"properties": {
|
|
242
|
+
"type": {
|
|
243
|
+
"enum": [
|
|
244
|
+
"String",
|
|
245
|
+
"Text",
|
|
246
|
+
"Hidden",
|
|
247
|
+
"Dropdown"
|
|
248
|
+
],
|
|
249
|
+
"errorMessage": "invalid property type ${0} for binding type ${1/binding/type}; must be any of { String, Text, Hidden, Dropdown }"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"if": {
|
|
256
|
+
"properties": {
|
|
257
|
+
"optional": {
|
|
258
|
+
"const": true
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"required": [
|
|
262
|
+
"optional"
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
"then": {
|
|
266
|
+
"properties": {
|
|
267
|
+
"binding": {
|
|
268
|
+
"properties": {
|
|
269
|
+
"type": {
|
|
270
|
+
"enum": [
|
|
271
|
+
"zeebe:input",
|
|
272
|
+
"zeebe:output"
|
|
273
|
+
],
|
|
274
|
+
"errorMessage": "optional is not supported for binding type ${0}; must be any of { zeebe:input, zeebe:output }"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"required": [
|
|
278
|
+
"type"
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"if": {
|
|
286
|
+
"properties": {
|
|
287
|
+
"optional": {
|
|
288
|
+
"const": true
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"required": [
|
|
292
|
+
"optional"
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
"then": {
|
|
296
|
+
"properties": {
|
|
297
|
+
"constraints": {
|
|
298
|
+
"properties": {
|
|
299
|
+
"notEmpty": {
|
|
300
|
+
"const": false,
|
|
301
|
+
"errorMessage": "optional is not allowed for truthy \"notEmpty\" constraint"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"required": [
|
|
305
|
+
"notEmpty"
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"properties": {
|
|
313
|
+
"binding": {
|
|
314
|
+
"$id": "#/properties/property/binding",
|
|
315
|
+
"type": "object",
|
|
316
|
+
"title": "property binding",
|
|
317
|
+
"description": "A binding to a BPMN 2.0 property",
|
|
318
|
+
"required": [
|
|
319
|
+
"type"
|
|
320
|
+
],
|
|
321
|
+
"allOf": [
|
|
322
|
+
{
|
|
323
|
+
"if": {
|
|
324
|
+
"properties": {
|
|
325
|
+
"type": {
|
|
326
|
+
"enum": [
|
|
327
|
+
"property",
|
|
328
|
+
"zeebe:input"
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"required": [
|
|
333
|
+
"type"
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
"then": {
|
|
337
|
+
"required": [
|
|
338
|
+
"name"
|
|
339
|
+
],
|
|
340
|
+
"errorMessage": "property.binding ${0/type} requires name"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"if": {
|
|
345
|
+
"properties": {
|
|
346
|
+
"type": {
|
|
347
|
+
"const": "zeebe:output"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"required": [
|
|
351
|
+
"type"
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
"then": {
|
|
355
|
+
"required": [
|
|
356
|
+
"source"
|
|
357
|
+
],
|
|
358
|
+
"errorMessage": "property.binding ${0/type} requires source"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"if": {
|
|
363
|
+
"properties": {
|
|
364
|
+
"type": {
|
|
365
|
+
"const": "zeebe:taskHeader"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"required": [
|
|
369
|
+
"type"
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
"then": {
|
|
373
|
+
"required": [
|
|
374
|
+
"key"
|
|
375
|
+
],
|
|
376
|
+
"errorMessage": "property.binding ${0/type} requires key"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"properties": {
|
|
381
|
+
"type": {
|
|
382
|
+
"$id": "#/properties/property/binding/type",
|
|
383
|
+
"type": "string",
|
|
384
|
+
"title": "property binding type",
|
|
385
|
+
"enum": [
|
|
386
|
+
"property",
|
|
387
|
+
"zeebe:taskDefinition:type",
|
|
388
|
+
"zeebe:input",
|
|
389
|
+
"zeebe:output",
|
|
390
|
+
"zeebe:taskHeader"
|
|
391
|
+
],
|
|
392
|
+
"errorMessage": "invalid property.binding type ${0}; must be any of { property, zeebe:taskDefinition:type, zeebe:input, zeebe:output, zeebe:taskHeader }",
|
|
393
|
+
"description": "The type of the property binding"
|
|
394
|
+
},
|
|
395
|
+
"name": {
|
|
396
|
+
"$id": "#/properties/property/binding/name",
|
|
397
|
+
"type": "string",
|
|
398
|
+
"title": "property binding name",
|
|
399
|
+
"description": "The name of binding xml property"
|
|
400
|
+
},
|
|
401
|
+
"source": {
|
|
402
|
+
"$id": "#/properties/property/binding/source",
|
|
403
|
+
"type": "string",
|
|
404
|
+
"title": "property binding source",
|
|
405
|
+
"description": "The source value of a property binding (zeebe:output)"
|
|
406
|
+
},
|
|
407
|
+
"key": {
|
|
408
|
+
"$id": "#/properties/property/binding/key",
|
|
409
|
+
"type": "string",
|
|
410
|
+
"title": "property binding key",
|
|
411
|
+
"description": "The key value of a property binding (zeebe:taskHeader)"
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"optional": {
|
|
416
|
+
"$id": "#/optional",
|
|
417
|
+
"type": "boolean",
|
|
418
|
+
"title": "element template optional",
|
|
419
|
+
"description": "Indicates whether a property is optional"
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
"template": {
|
|
427
|
+
"type": "object",
|
|
428
|
+
"allOf": [
|
|
429
|
+
{
|
|
430
|
+
"required": [
|
|
431
|
+
"name",
|
|
432
|
+
"id",
|
|
433
|
+
"appliesTo",
|
|
434
|
+
"properties"
|
|
435
|
+
],
|
|
436
|
+
"properties": {
|
|
437
|
+
"name": {
|
|
438
|
+
"$id": "#/name",
|
|
439
|
+
"type": "string",
|
|
440
|
+
"title": "element template name",
|
|
441
|
+
"description": "The name of the element template"
|
|
442
|
+
},
|
|
443
|
+
"id": {
|
|
444
|
+
"$id": "#/id",
|
|
445
|
+
"type": "string",
|
|
446
|
+
"title": "element template id",
|
|
447
|
+
"description": "The identifier of the element template"
|
|
448
|
+
},
|
|
449
|
+
"description": {
|
|
450
|
+
"$id": "#/description",
|
|
451
|
+
"type": "string",
|
|
452
|
+
"title": "element template description",
|
|
453
|
+
"description": "The description of the element template"
|
|
454
|
+
},
|
|
455
|
+
"version": {
|
|
456
|
+
"$id": "#/version",
|
|
457
|
+
"type": "number",
|
|
458
|
+
"title": "element template version",
|
|
459
|
+
"description": "The version of the element template"
|
|
460
|
+
},
|
|
461
|
+
"isDefault": {
|
|
462
|
+
"$id": "#/isDefault",
|
|
463
|
+
"type": "boolean",
|
|
464
|
+
"title": "element template is default",
|
|
465
|
+
"description": "Indicates whether the element template is a default template"
|
|
466
|
+
},
|
|
467
|
+
"appliesTo": {
|
|
468
|
+
"$id": "#/appliesTo",
|
|
469
|
+
"type": "array",
|
|
470
|
+
"title": "element template applies to",
|
|
471
|
+
"description": "The definition for which element types the element template can be applied",
|
|
472
|
+
"default": [],
|
|
473
|
+
"items": {
|
|
474
|
+
"$id": "#/appliesTo/items",
|
|
475
|
+
"type": "string",
|
|
476
|
+
"pattern": "^(.*?:)",
|
|
477
|
+
"errorMessage": {
|
|
478
|
+
"pattern": "invalid item for \"appliesTo\", should contain namespaced property, example: \"bpmn:Task\""
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
"metadata": {
|
|
483
|
+
"$id": "#/metadata",
|
|
484
|
+
"type": "object",
|
|
485
|
+
"title": "element template metadata",
|
|
486
|
+
"description": "Some metadata for further configuration"
|
|
487
|
+
},
|
|
488
|
+
"entriesVisible": {
|
|
489
|
+
"$id": "#/entriesVisible",
|
|
490
|
+
"type": "boolean",
|
|
491
|
+
"title": "element template entries visible",
|
|
492
|
+
"description": "Select whether non-template entries are visible in the properties panel"
|
|
493
|
+
},
|
|
494
|
+
"groups": {
|
|
495
|
+
"$id": "#/groups",
|
|
496
|
+
"type": "array",
|
|
497
|
+
"title": "element template properties groups",
|
|
498
|
+
"description": "The custom defined groups of the element template",
|
|
499
|
+
"default": [],
|
|
500
|
+
"items": {
|
|
501
|
+
"$id": "#/groups/group",
|
|
502
|
+
"type": "object",
|
|
503
|
+
"title": "element template group",
|
|
504
|
+
"description": "A custom defined group for the element template",
|
|
505
|
+
"default": {},
|
|
506
|
+
"required": [
|
|
507
|
+
"id",
|
|
508
|
+
"label"
|
|
509
|
+
],
|
|
510
|
+
"errorMessage": {
|
|
511
|
+
"required": {
|
|
512
|
+
"id": "missing id for group \"${0#}\"",
|
|
513
|
+
"label": "missing label for group \"${0#}\""
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"properties": {
|
|
517
|
+
"id": {
|
|
518
|
+
"$id": "#/groups/group/id",
|
|
519
|
+
"type": "string",
|
|
520
|
+
"title": "group id",
|
|
521
|
+
"description": "The id of the custom group"
|
|
522
|
+
},
|
|
523
|
+
"label": {
|
|
524
|
+
"$id": "#/groups/group/label",
|
|
525
|
+
"type": "string",
|
|
526
|
+
"title": "group label",
|
|
527
|
+
"description": "The label of the custom group"
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
"errorMessage": {
|
|
534
|
+
"required": {
|
|
535
|
+
"name": "missing template name",
|
|
536
|
+
"id": "missing template id",
|
|
537
|
+
"appliesTo": "missing appliesTo=[]",
|
|
538
|
+
"properties": "missing properties=[]"
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
],
|
|
543
|
+
"properties": {
|
|
544
|
+
"properties": {
|
|
545
|
+
"$ref": "#/definitions/properties",
|
|
546
|
+
"$id": "#/properties"
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
"oneOf": [
|
|
552
|
+
{
|
|
553
|
+
"$ref": "#/definitions/template"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"type": "array",
|
|
557
|
+
"items": {
|
|
558
|
+
"$ref": "#/definitions/template"
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
]
|
|
562
|
+
}
|