@camunda/element-templates-json-schema 0.3.0 → 0.6.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.
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Report a problem and help us fix it.
|
|
4
|
+
labels: "bug"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
__Describe the Bug__
|
|
9
|
+
|
|
10
|
+
<!-- A clear and concise description of what the bug is. -->
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
__Steps to Reproduce__
|
|
14
|
+
|
|
15
|
+
<!-- Clear steps that allow us to reproduce the error. -->
|
|
16
|
+
|
|
17
|
+
1. do this
|
|
18
|
+
2. do that
|
|
19
|
+
3. now this happens
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
__Expected Behavior__
|
|
23
|
+
|
|
24
|
+
<!-- A clear and concise description of what you expected to happen. -->
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
__Environment__
|
|
28
|
+
|
|
29
|
+
- Host (Browser/Node version), if applicable: [e.g. MS Edge 18, Chrome 69, Node 10 LTS]
|
|
30
|
+
- OS: [e.g. Windows 7]
|
|
31
|
+
- Library version: [e.g. 0.3.0]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea or general improvement.
|
|
4
|
+
labels: "enhancement"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
__Is your feature request related to a problem? Please describe__
|
|
9
|
+
|
|
10
|
+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --->
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
__Describe the solution you'd like__
|
|
14
|
+
|
|
15
|
+
<!-- A clear and concise description of what you want to happen. -->
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
__Describe alternatives you've considered__
|
|
19
|
+
|
|
20
|
+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
__Additional context__
|
|
24
|
+
|
|
25
|
+
<!-- Add any other context or screenshots about the feature request here. -->
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Task
|
|
3
|
+
about: Describe a generic activity we should carry out.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
__What should we do?__
|
|
8
|
+
|
|
9
|
+
<!-- Clearly describe the activity we should carry out. -->
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
__Why should we do it?__
|
|
13
|
+
|
|
14
|
+
<!-- Argue why doing it is a healthy investment of our time. -->
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,32 @@ All notable changes to [element-templates-json-schema](https://github.com/camund
|
|
|
6
6
|
|
|
7
7
|
___Note:__ Yet to be released changes appear here._
|
|
8
8
|
|
|
9
|
+
## 0.6.0
|
|
10
|
+
|
|
11
|
+
* `FEAT`: add `groups` schema ([#39](https://github.com/camunda/element-templates-json-schema/pull/39))
|
|
12
|
+
|
|
13
|
+
## 0.5.0
|
|
14
|
+
|
|
15
|
+
* `FEAT`: remove deprecated `scopes_old`
|
|
16
|
+
* `FEAT`: remove type `Object` from `template#entriesVisible`
|
|
17
|
+
|
|
18
|
+
### BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
* `template#scopes` takes an Array as the only valid type. Wrap your `scopes` object in an Array and add `type` to migrate.
|
|
21
|
+
* `template#entriesVisible` can now be only of type `Boolean`. Make sure to adjust your templates.
|
|
22
|
+
|
|
23
|
+
## 0.4.0
|
|
24
|
+
|
|
25
|
+
* `FEAT`: support `camunda:in` and `camunda:out` bindings for specific `target`, `source` or `sourceExpression` given `local` scope ([d0e9d2b](https://github.com/camunda/element-templates-json-schema/commit/d0e9d2b5d75a9f36366125b08065db26ec409fa9))
|
|
26
|
+
|
|
27
|
+
## 0.3.1
|
|
28
|
+
|
|
29
|
+
* `FIX`: set `minLength` and `maxLength` properties as numbers ([#24](https://github.com/camunda/element-templates-json-schema/issues/24))
|
|
30
|
+
* `FIX`: adjust various error messages to be more explicit ([#27](https://github.com/camunda/element-templates-json-schema/pull/27))
|
|
31
|
+
* `FIX`: allow `entriesVisible` property to be boolean ([`81043941`](https://github.com/camunda/element-templates-json-schema/commit/81043941441b7e682b09ca99aabedadfba8f622f))
|
|
32
|
+
* `FIX`: allow `pattern` property to be string ([`65370578`](https://github.com/camunda/element-templates-json-schema/commit/653705786c4b7499a1aa15c3e6463815f8744fa2))
|
|
33
|
+
* `CHORE`: make schema compatible with `ajv@7` ([`5630ef53`](https://github.com/camunda/element-templates-json-schema/commit/5630ef5362857667adbdd43ab3fa15cd5d648406))
|
|
34
|
+
|
|
9
35
|
## 0.3.0
|
|
10
36
|
|
|
11
37
|
* `FEAT`: support multiple templates as a single entity ([#15](https://github.com/camunda/element-templates-json-schema/issues/15))
|
|
@@ -22,4 +48,4 @@ ___Note:__ Yet to be released changes appear here._
|
|
|
22
48
|
|
|
23
49
|
## 0.1.0
|
|
24
50
|
|
|
25
|
-
* `FEAT`: initial version :tada:
|
|
51
|
+
* `FEAT`: initial version :tada:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/element-templates-json-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "JSON Schema for (Camunda) Element Templates",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint": "eslint .",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://github.com/camunda/element-templates-json-schema#readme",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"ajv": "^
|
|
28
|
-
"ajv-errors": "^
|
|
29
|
-
"chai": "^4.
|
|
30
|
-
"eslint": "^7.
|
|
31
|
-
"eslint-plugin-bpmn-io": "^0.
|
|
27
|
+
"ajv": "^7.2.3",
|
|
28
|
+
"ajv-errors": "^2.0.1",
|
|
29
|
+
"chai": "^4.3.4",
|
|
30
|
+
"eslint": "^7.22.0",
|
|
31
|
+
"eslint-plugin-bpmn-io": "^0.13.0",
|
|
32
32
|
"esm": "^3.2.25",
|
|
33
|
-
"mocha": "^8.
|
|
33
|
+
"mocha": "^8.3.2",
|
|
34
34
|
"npm-run-all": "^4.1.5"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/resources/schema.json
CHANGED
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
"required": [
|
|
19
19
|
"binding"
|
|
20
20
|
],
|
|
21
|
+
"errorMessage": {
|
|
22
|
+
"required": {
|
|
23
|
+
"binding": "missing binding for property \"${0#}\""
|
|
24
|
+
}
|
|
25
|
+
},
|
|
21
26
|
"allOf": [
|
|
22
27
|
{
|
|
23
28
|
"if": {
|
|
@@ -94,7 +99,7 @@
|
|
|
94
99
|
"enum": [
|
|
95
100
|
"Hidden"
|
|
96
101
|
],
|
|
97
|
-
"errorMessage": "invalid property type ${
|
|
102
|
+
"errorMessage": "invalid property type ${1/type} for binding type \"camunda:executionListener\"; must be \"Hidden\""
|
|
98
103
|
}
|
|
99
104
|
}
|
|
100
105
|
}
|
|
@@ -298,7 +303,7 @@
|
|
|
298
303
|
]
|
|
299
304
|
},
|
|
300
305
|
"then": {
|
|
301
|
-
"
|
|
306
|
+
"anyOf": [
|
|
302
307
|
{
|
|
303
308
|
"required": [
|
|
304
309
|
"variables"
|
|
@@ -310,7 +315,7 @@
|
|
|
310
315
|
]
|
|
311
316
|
}
|
|
312
317
|
],
|
|
313
|
-
"errorMessage": "property.binding ${0/type} requires variables or
|
|
318
|
+
"errorMessage": "property.binding ${0/type} requires variables, target, or both"
|
|
314
319
|
}
|
|
315
320
|
},
|
|
316
321
|
{
|
|
@@ -329,20 +334,84 @@
|
|
|
329
334
|
{
|
|
330
335
|
"required": [
|
|
331
336
|
"variables"
|
|
332
|
-
]
|
|
337
|
+
],
|
|
338
|
+
"not": {
|
|
339
|
+
"anyOf": [
|
|
340
|
+
{
|
|
341
|
+
"required": [
|
|
342
|
+
"source"
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"required": [
|
|
347
|
+
"sourceExpression"
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
]
|
|
351
|
+
}
|
|
333
352
|
},
|
|
334
353
|
{
|
|
335
354
|
"required": [
|
|
336
355
|
"source"
|
|
337
|
-
]
|
|
356
|
+
],
|
|
357
|
+
"not": {
|
|
358
|
+
"anyOf": [
|
|
359
|
+
{
|
|
360
|
+
"required": [
|
|
361
|
+
"variables"
|
|
362
|
+
]
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"required": [
|
|
366
|
+
"sourceExpression"
|
|
367
|
+
]
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
}
|
|
338
371
|
},
|
|
339
372
|
{
|
|
340
373
|
"required": [
|
|
341
374
|
"sourceExpression"
|
|
342
|
-
]
|
|
375
|
+
],
|
|
376
|
+
"not": {
|
|
377
|
+
"anyOf": [
|
|
378
|
+
{
|
|
379
|
+
"required": [
|
|
380
|
+
"variables"
|
|
381
|
+
]
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"required": [
|
|
385
|
+
"source"
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
]
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"required": [
|
|
393
|
+
"variables",
|
|
394
|
+
"sourceExpression"
|
|
395
|
+
],
|
|
396
|
+
"not": {
|
|
397
|
+
"required": [
|
|
398
|
+
"source"
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"required": [
|
|
404
|
+
"variables",
|
|
405
|
+
"source"
|
|
406
|
+
],
|
|
407
|
+
"not": {
|
|
408
|
+
"required": [
|
|
409
|
+
"sourceExpression"
|
|
410
|
+
]
|
|
411
|
+
}
|
|
343
412
|
}
|
|
344
413
|
],
|
|
345
|
-
"errorMessage": "property.binding ${0/type} requires variables, sourceExpression or source"
|
|
414
|
+
"errorMessage": "property.binding ${0/type} requires one of the following: variables, sourceExpression, source, (sourceExpression and variables), or (source and variables)"
|
|
346
415
|
}
|
|
347
416
|
},
|
|
348
417
|
{
|
|
@@ -385,7 +454,7 @@
|
|
|
385
454
|
"camunda:field",
|
|
386
455
|
"camunda:errorEventDefinition"
|
|
387
456
|
],
|
|
388
|
-
"errorMessage": "invalid property.binding type ${0}; must be any of { property, camunda:property, camunda:inputParameter, camunda:outputParameter, camunda:in, camunda:out, camunda:in:businessKey, camunda:executionListener, camunda:field }",
|
|
457
|
+
"errorMessage": "invalid property.binding type ${0}; must be any of { property, camunda:property, camunda:inputParameter, camunda:outputParameter, camunda:in, camunda:out, camunda:in:businessKey, camunda:executionListener, camunda:field, camunda:errorEventDefinition }",
|
|
389
458
|
"description": "The type of the property binding"
|
|
390
459
|
},
|
|
391
460
|
"name": {
|
|
@@ -456,60 +525,50 @@
|
|
|
456
525
|
},
|
|
457
526
|
"minLength": {
|
|
458
527
|
"$id": "#/properties/property/constraints/minLength",
|
|
459
|
-
"type": "
|
|
528
|
+
"type": "number",
|
|
460
529
|
"title": "property constraints min length",
|
|
461
530
|
"description": "The minimal length for the control field value"
|
|
462
531
|
},
|
|
463
532
|
"maxLength": {
|
|
464
533
|
"$id": "#/properties/property/constraints/maxLength",
|
|
465
|
-
"type": "
|
|
534
|
+
"type": "number",
|
|
466
535
|
"title": "property constraints max length",
|
|
467
536
|
"description": "The maximal length for the control field value"
|
|
468
537
|
},
|
|
469
538
|
"pattern": {
|
|
470
539
|
"$id": "#/properties/property/constraints/pattern",
|
|
471
|
-
"type": "object",
|
|
472
540
|
"title": "property constraints pattern",
|
|
473
541
|
"description": "A regular expression pattern for the constraints",
|
|
474
|
-
"
|
|
475
|
-
|
|
476
|
-
"
|
|
477
|
-
"
|
|
478
|
-
|
|
479
|
-
|
|
542
|
+
"oneOf": [
|
|
543
|
+
{
|
|
544
|
+
"type": "object",
|
|
545
|
+
"properties": {
|
|
546
|
+
"value": {
|
|
547
|
+
"$id": "#/properties/property/constraints/pattern/value",
|
|
548
|
+
"type": "string",
|
|
549
|
+
"title": "property constraints pattern value",
|
|
550
|
+
"description": "The regular expression of the pattern constraint"
|
|
551
|
+
},
|
|
552
|
+
"message": {
|
|
553
|
+
"$id": "#/properties/property/constraints/pattern/message",
|
|
554
|
+
"type": "string",
|
|
555
|
+
"title": "property constraints pattern message",
|
|
556
|
+
"description": "The validation message of the pattern constraint"
|
|
557
|
+
}
|
|
558
|
+
}
|
|
480
559
|
},
|
|
481
|
-
|
|
482
|
-
"
|
|
483
|
-
"type": "string",
|
|
484
|
-
"title": "property constraints pattern message",
|
|
485
|
-
"description": "The validation message of the pattern constraint"
|
|
560
|
+
{
|
|
561
|
+
"type": "string"
|
|
486
562
|
}
|
|
487
|
-
|
|
563
|
+
]
|
|
488
564
|
}
|
|
489
565
|
}
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
"type": "object",
|
|
497
|
-
"title": "element template scope",
|
|
498
|
-
"deprecated": true,
|
|
499
|
-
"description": "@Deprecated - Special scoped bindings that allow you to configure nested elements",
|
|
500
|
-
"additionalProperties": false,
|
|
501
|
-
"errorMessage": {
|
|
502
|
-
"additionalProperties": "invalid scope, object descriptor is only supported for camunda:Connector"
|
|
503
|
-
},
|
|
504
|
-
"properties": {
|
|
505
|
-
"camunda:Connector": {
|
|
506
|
-
"type": "object",
|
|
507
|
-
"title": "element template scoped connector binding",
|
|
508
|
-
"description": "A scoped binding for a camunda connector inside the element",
|
|
509
|
-
"properties": {
|
|
510
|
-
"properties": {
|
|
511
|
-
"$ref": "#/definitions/properties"
|
|
512
|
-
}
|
|
566
|
+
},
|
|
567
|
+
"group": {
|
|
568
|
+
"$id": "#/properties/property/group",
|
|
569
|
+
"type": "string",
|
|
570
|
+
"title": "property group",
|
|
571
|
+
"description": "The custom group of the control field for the property"
|
|
513
572
|
}
|
|
514
573
|
}
|
|
515
574
|
}
|
|
@@ -542,6 +601,12 @@
|
|
|
542
601
|
"type",
|
|
543
602
|
"properties"
|
|
544
603
|
],
|
|
604
|
+
"errorMessage": {
|
|
605
|
+
"required": {
|
|
606
|
+
"type": "invalid scope, missing type",
|
|
607
|
+
"properties": "invalid scope ${0/type}, missing properties=[]"
|
|
608
|
+
}
|
|
609
|
+
},
|
|
545
610
|
"allOf": [
|
|
546
611
|
{
|
|
547
612
|
"if": {
|
|
@@ -560,7 +625,7 @@
|
|
|
560
625
|
"required": [
|
|
561
626
|
"id"
|
|
562
627
|
],
|
|
563
|
-
"errorMessage": "
|
|
628
|
+
"errorMessage": "invalid scope ${0/type}, missing id"
|
|
564
629
|
}
|
|
565
630
|
}
|
|
566
631
|
]
|
|
@@ -614,7 +679,10 @@
|
|
|
614
679
|
"items": {
|
|
615
680
|
"$id": "#/appliesTo/items",
|
|
616
681
|
"type": "string",
|
|
617
|
-
"pattern": "^(
|
|
682
|
+
"pattern": "^(.*?:)",
|
|
683
|
+
"errorMessage": {
|
|
684
|
+
"pattern": "invalid item for \"appliesTo\", should contain namespaced property, example: \"bpmn:Task\""
|
|
685
|
+
}
|
|
618
686
|
}
|
|
619
687
|
},
|
|
620
688
|
"properties": {
|
|
@@ -628,21 +696,60 @@
|
|
|
628
696
|
"description": "Some metadata for further configuration"
|
|
629
697
|
},
|
|
630
698
|
"scopes": {
|
|
631
|
-
"
|
|
632
|
-
|
|
633
|
-
"$ref": "#/definitions/scopes_old"
|
|
634
|
-
},
|
|
635
|
-
{
|
|
636
|
-
"$ref": "#/definitions/scopes"
|
|
637
|
-
}
|
|
638
|
-
]
|
|
699
|
+
"$ref": "#/definitions/scopes",
|
|
700
|
+
"$id": "#/scopes"
|
|
639
701
|
},
|
|
640
702
|
"entriesVisible": {
|
|
641
703
|
"$id": "#/entriesVisible",
|
|
642
|
-
"
|
|
643
|
-
"type": "object",
|
|
704
|
+
"type": "boolean",
|
|
644
705
|
"title": "element template entries visible",
|
|
645
|
-
"description": "
|
|
706
|
+
"description": "Select whether non-template entries are visible in the properties panel"
|
|
707
|
+
},
|
|
708
|
+
"groups": {
|
|
709
|
+
"$id": "#/groups",
|
|
710
|
+
"type": "array",
|
|
711
|
+
"title": "element template properties groups",
|
|
712
|
+
"description": "The custom defined groups of the element template",
|
|
713
|
+
"default": [],
|
|
714
|
+
"items": {
|
|
715
|
+
"$id": "#/groups/group",
|
|
716
|
+
"type": "object",
|
|
717
|
+
"title": "element template group",
|
|
718
|
+
"description": "A custom defined group for the element template",
|
|
719
|
+
"default": {},
|
|
720
|
+
"required": [
|
|
721
|
+
"id",
|
|
722
|
+
"label"
|
|
723
|
+
],
|
|
724
|
+
"errorMessage": {
|
|
725
|
+
"required": {
|
|
726
|
+
"id": "missing id for group \"${0#}\"",
|
|
727
|
+
"label": "missing label for group \"${0#}\""
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
"properties": {
|
|
731
|
+
"id": {
|
|
732
|
+
"$id": "#/groups/group/id",
|
|
733
|
+
"type": "string",
|
|
734
|
+
"title": "group id",
|
|
735
|
+
"description": "The id of the custom group"
|
|
736
|
+
},
|
|
737
|
+
"label": {
|
|
738
|
+
"$id": "#/groups/group/label",
|
|
739
|
+
"type": "string",
|
|
740
|
+
"title": "group label",
|
|
741
|
+
"description": "The label of the custom group"
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"errorMessage": {
|
|
748
|
+
"required": {
|
|
749
|
+
"name": "missing template name",
|
|
750
|
+
"id": "missing template id",
|
|
751
|
+
"appliesTo": "missing appliesTo=[]",
|
|
752
|
+
"properties": "missing properties=[]"
|
|
646
753
|
}
|
|
647
754
|
}
|
|
648
755
|
}
|