@camunda/element-templates-json-schema-shared 0.1.0 → 0.2.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 +3 -0
- package/package.json +3 -2
- package/src/defs/base-properties.json +26 -37
- package/src/defs/base.json +15 -17
- package/src/defs/examples.json +39 -0
- package/src/defs/groups.json +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,9 @@ All notable changes to [@camunda/element-templates-json-schema-shared](https://g
|
|
|
6
6
|
|
|
7
7
|
___Note:__ Yet to be released changes appear here._
|
|
8
8
|
|
|
9
|
+
## 0.2.0
|
|
10
|
+
|
|
11
|
+
* `FEAT`: provide better editor annotations ([#45](https://github.com/camunda/element-templates-json-schema/pull/45))
|
|
9
12
|
|
|
10
13
|
## 0.1.0
|
|
11
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/element-templates-json-schema-shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Shared schema definitions used within element-templates-json-schema",
|
|
5
5
|
"files": [
|
|
6
6
|
"src"
|
|
@@ -15,5 +15,6 @@
|
|
|
15
15
|
"element-templates",
|
|
16
16
|
"camunda"
|
|
17
17
|
],
|
|
18
|
-
"license": "MIT"
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"gitHead": "f4b102f0cdb536cba89e1dbfbe8bd3b58b75a224"
|
|
19
20
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "array",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
3
|
+
"description": "List of properties of the element template.",
|
|
4
|
+
"allOf": [
|
|
5
|
+
{ "$ref": "examples.json#/properties" }
|
|
6
|
+
],
|
|
6
7
|
"items": {
|
|
7
8
|
"type": "object",
|
|
8
|
-
"title": "element template property",
|
|
9
|
-
"description": "A property defined for the element template",
|
|
10
9
|
"default": {},
|
|
11
10
|
"allOf": [
|
|
12
11
|
{
|
|
@@ -35,53 +34,47 @@
|
|
|
35
34
|
"string",
|
|
36
35
|
"boolean"
|
|
37
36
|
],
|
|
38
|
-
"
|
|
39
|
-
"description": "The value of the control field for the property"
|
|
37
|
+
"description": "The value of a control field."
|
|
40
38
|
},
|
|
41
39
|
"description": {
|
|
42
40
|
"$id": "#/properties/property/description",
|
|
43
41
|
"type": "string",
|
|
44
|
-
"
|
|
45
|
-
"description": "The description of the control field"
|
|
42
|
+
"description": "The description of a control field."
|
|
46
43
|
},
|
|
47
44
|
"label": {
|
|
48
45
|
"$id": "#/properties/property/label",
|
|
49
46
|
"type": "string",
|
|
50
|
-
"
|
|
51
|
-
"description": "The label of the control field for the property"
|
|
47
|
+
"description": "The label of a control field."
|
|
52
48
|
},
|
|
53
49
|
"type": {
|
|
54
50
|
"$id": "#/properties/property/type",
|
|
55
51
|
"type": "string",
|
|
56
|
-
"
|
|
57
|
-
"description": "The type of the control field"
|
|
52
|
+
"description": "The type of a control field."
|
|
58
53
|
},
|
|
59
54
|
"editable": {
|
|
60
55
|
"$id": "#/properties/property/editable",
|
|
61
56
|
"type": "boolean",
|
|
62
|
-
"
|
|
63
|
-
"description": "Indicates whether the property is editable or not"
|
|
57
|
+
"description": "Indicates whether a control field is editable or not."
|
|
64
58
|
},
|
|
65
59
|
"choices": {
|
|
66
60
|
"$id": "#/properties/property/choices",
|
|
67
61
|
"type": "array",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
62
|
+
"description": "The choices for dropdown fields.",
|
|
63
|
+
"default": [],
|
|
70
64
|
"items": {
|
|
71
65
|
"$id": "#/properties/property/choices/item",
|
|
72
66
|
"type": "object",
|
|
67
|
+
"default": {},
|
|
73
68
|
"properties": {
|
|
74
69
|
"name": {
|
|
75
70
|
"$id": "#/properties/property/choices/item/name",
|
|
76
71
|
"type": "string",
|
|
77
|
-
"
|
|
78
|
-
"description": "The name of the choice"
|
|
72
|
+
"description": "The name of a choice."
|
|
79
73
|
},
|
|
80
74
|
"value": {
|
|
81
75
|
"$id": "#/properties/property/choices/item/value",
|
|
82
76
|
"type": "string",
|
|
83
|
-
"
|
|
84
|
-
"description": "The value of the choice"
|
|
77
|
+
"description": "The value of a choice."
|
|
85
78
|
}
|
|
86
79
|
},
|
|
87
80
|
"required": [
|
|
@@ -94,46 +87,43 @@
|
|
|
94
87
|
"constraints": {
|
|
95
88
|
"$id": "#/properties/property/constraints",
|
|
96
89
|
"type": "object",
|
|
97
|
-
"
|
|
98
|
-
"
|
|
90
|
+
"description": "The validation constraints of a control field.",
|
|
91
|
+
"allOf": [
|
|
92
|
+
{ "$ref": "examples.json#/constraints" }
|
|
93
|
+
],
|
|
99
94
|
"properties": {
|
|
100
95
|
"notEmpty": {
|
|
101
96
|
"$id": "#/properties/property/constraints/notEmpty",
|
|
102
97
|
"type": "boolean",
|
|
103
|
-
"
|
|
104
|
-
"description": "The control field must not be empty"
|
|
98
|
+
"description": "The control field must not be empty."
|
|
105
99
|
},
|
|
106
100
|
"minLength": {
|
|
107
101
|
"$id": "#/properties/property/constraints/minLength",
|
|
108
102
|
"type": "number",
|
|
109
|
-
"
|
|
110
|
-
"description": "The minimal length for the control field value"
|
|
103
|
+
"description": "The minimal length of a control field value."
|
|
111
104
|
},
|
|
112
105
|
"maxLength": {
|
|
113
106
|
"$id": "#/properties/property/constraints/maxLength",
|
|
114
107
|
"type": "number",
|
|
115
|
-
"
|
|
116
|
-
"description": "The maximal length for the control field value"
|
|
108
|
+
"description": "The maximal length for a control field value."
|
|
117
109
|
},
|
|
118
110
|
"pattern": {
|
|
119
111
|
"$id": "#/properties/property/constraints/pattern",
|
|
120
|
-
"
|
|
121
|
-
"description": "A regular expression pattern for the constraints",
|
|
112
|
+
"description": "A regular expression pattern for a constraint.",
|
|
122
113
|
"oneOf": [
|
|
123
114
|
{
|
|
124
115
|
"type": "object",
|
|
116
|
+
"default": {},
|
|
125
117
|
"properties": {
|
|
126
118
|
"value": {
|
|
127
119
|
"$id": "#/properties/property/constraints/pattern/value",
|
|
128
120
|
"type": "string",
|
|
129
|
-
"
|
|
130
|
-
"description": "The regular expression of the pattern constraint"
|
|
121
|
+
"description": "The regular expression of a pattern."
|
|
131
122
|
},
|
|
132
123
|
"message": {
|
|
133
124
|
"$id": "#/properties/property/constraints/pattern/message",
|
|
134
125
|
"type": "string",
|
|
135
|
-
"
|
|
136
|
-
"description": "The validation message of the pattern constraint"
|
|
126
|
+
"description": "The validation message of a pattern."
|
|
137
127
|
}
|
|
138
128
|
}
|
|
139
129
|
},
|
|
@@ -147,8 +137,7 @@
|
|
|
147
137
|
"group": {
|
|
148
138
|
"$id": "#/properties/property/group",
|
|
149
139
|
"type": "string",
|
|
150
|
-
"
|
|
151
|
-
"description": "The custom group of the control field for the property"
|
|
140
|
+
"description": "The custom group of a control field."
|
|
152
141
|
}
|
|
153
142
|
}
|
|
154
143
|
}
|
package/src/defs/base.json
CHANGED
|
@@ -9,38 +9,32 @@
|
|
|
9
9
|
"name": {
|
|
10
10
|
"$id": "#/name",
|
|
11
11
|
"type": "string",
|
|
12
|
-
"
|
|
13
|
-
"description": "The name of the element template"
|
|
12
|
+
"description": "The name of the element template."
|
|
14
13
|
},
|
|
15
14
|
"id": {
|
|
16
15
|
"$id": "#/id",
|
|
17
16
|
"type": "string",
|
|
18
|
-
"
|
|
19
|
-
"description": "The identifier of the element template"
|
|
17
|
+
"description": "The identifier of the element template."
|
|
20
18
|
},
|
|
21
19
|
"description": {
|
|
22
20
|
"$id": "#/description",
|
|
23
21
|
"type": "string",
|
|
24
|
-
"
|
|
25
|
-
"description": "The description of the element template"
|
|
22
|
+
"description": "The description of the element template."
|
|
26
23
|
},
|
|
27
24
|
"version": {
|
|
28
25
|
"$id": "#/version",
|
|
29
26
|
"type": "number",
|
|
30
|
-
"
|
|
31
|
-
"description": "The version of the element template"
|
|
27
|
+
"description": "Optional version of the template. If you add a version to a template it will be considered unique based on its ID and version. Two templates can have the same ID if their version is different."
|
|
32
28
|
},
|
|
33
29
|
"isDefault": {
|
|
34
30
|
"$id": "#/isDefault",
|
|
35
31
|
"type": "boolean",
|
|
36
|
-
"
|
|
37
|
-
"description": "Indicates whether the element template is a default template"
|
|
32
|
+
"description": "Indicates whether the element template is a default template."
|
|
38
33
|
},
|
|
39
34
|
"appliesTo": {
|
|
40
35
|
"$id": "#/appliesTo",
|
|
41
36
|
"type": "array",
|
|
42
|
-
"
|
|
43
|
-
"description": "The definition for which element types the element template can be applied",
|
|
37
|
+
"description": "List of BPMN types the template can be applied to.",
|
|
44
38
|
"default": [],
|
|
45
39
|
"items": {
|
|
46
40
|
"$id": "#/appliesTo/items",
|
|
@@ -48,20 +42,24 @@
|
|
|
48
42
|
"pattern": "^(.*?:)",
|
|
49
43
|
"errorMessage": {
|
|
50
44
|
"pattern": "invalid item for \"appliesTo\", should contain namespaced property, example: \"bpmn:Task\""
|
|
51
|
-
}
|
|
45
|
+
},
|
|
46
|
+
"allOf": [
|
|
47
|
+
{
|
|
48
|
+
"$ref": "examples.json#/appliesTo"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
52
51
|
}
|
|
53
52
|
},
|
|
54
53
|
"metadata": {
|
|
55
54
|
"$id": "#/metadata",
|
|
56
55
|
"type": "object",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
56
|
+
"description": "Some custom properties for further configuration.",
|
|
57
|
+
"default": {}
|
|
59
58
|
},
|
|
60
59
|
"entriesVisible": {
|
|
61
60
|
"$id": "#/entriesVisible",
|
|
62
61
|
"type": "boolean",
|
|
63
|
-
"
|
|
64
|
-
"description": "Select whether non-template entries are visible in the properties panel"
|
|
62
|
+
"description": "Select whether non-template entries are visible in the properties panel."
|
|
65
63
|
},
|
|
66
64
|
"groups": {
|
|
67
65
|
"$ref": "groups.json"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"appliesTo": {
|
|
3
|
+
"examples": [
|
|
4
|
+
"bpmn:Task",
|
|
5
|
+
"bpmn:ServiceTask",
|
|
6
|
+
"bpmn:SequenceFlow",
|
|
7
|
+
"bpmn:Process",
|
|
8
|
+
"bpmn:StartEvent",
|
|
9
|
+
"bpmn:Gateway"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"properties": {
|
|
13
|
+
"examples": [ [
|
|
14
|
+
{
|
|
15
|
+
"label": "Name",
|
|
16
|
+
"type": "String",
|
|
17
|
+
"binding": {
|
|
18
|
+
"type": "property",
|
|
19
|
+
"name": "name"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
] ]
|
|
23
|
+
},
|
|
24
|
+
"groups": {
|
|
25
|
+
"examples": [ [
|
|
26
|
+
{
|
|
27
|
+
"id": "group-1",
|
|
28
|
+
"label": "My Group"
|
|
29
|
+
}
|
|
30
|
+
] ]
|
|
31
|
+
},
|
|
32
|
+
"constraints": {
|
|
33
|
+
"examples": [
|
|
34
|
+
{
|
|
35
|
+
"notEmpty": true
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
package/src/defs/groups.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$id": "#/groups",
|
|
3
3
|
"type": "array",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
4
|
+
"description": "Custom fields can be ordered together via groups.",
|
|
5
|
+
"allOf": [
|
|
6
|
+
{
|
|
7
|
+
"$ref": "examples.json#/groups"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
7
10
|
"items": {
|
|
8
11
|
"$id": "#/groups/group",
|
|
9
12
|
"type": "object",
|
|
10
|
-
"title": "element template group",
|
|
11
|
-
"description": "A custom defined group for the element template",
|
|
12
13
|
"default": {},
|
|
13
14
|
"required": [
|
|
14
15
|
"id",
|
|
@@ -24,13 +25,11 @@
|
|
|
24
25
|
"id": {
|
|
25
26
|
"$id": "#/groups/group/id",
|
|
26
27
|
"type": "string",
|
|
27
|
-
"title": "group id",
|
|
28
28
|
"description": "The id of the custom group"
|
|
29
29
|
},
|
|
30
30
|
"label": {
|
|
31
31
|
"$id": "#/groups/group/label",
|
|
32
32
|
"type": "string",
|
|
33
|
-
"title": "group label",
|
|
34
33
|
"description": "The label of the custom group"
|
|
35
34
|
}
|
|
36
35
|
}
|