@camunda/element-templates-json-schema-shared 0.12.1 → 0.14.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/element-templates-json-schema-shared",
3
- "version": "0.12.1",
3
+ "version": "0.14.0",
4
4
  "description": "Shared schema definitions used within element-templates-json-schema",
5
5
  "files": [
6
6
  "src"
@@ -15,6 +15,5 @@
15
15
  "element-templates",
16
16
  "camunda"
17
17
  ],
18
- "license": "MIT",
19
- "gitHead": "f5d5f22a7f4bf98714cdce1a99ac5d782310b99a"
18
+ "license": "MIT"
20
19
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "type": "array",
3
- "description": "List of properties of the element template.",
3
+ "description": "List of the template's properties.",
4
4
  "allOf": [
5
5
  { "$ref": "examples.json#/properties" }
6
6
  ],
@@ -80,7 +80,8 @@
80
80
  "then": {
81
81
  "properties": {
82
82
  "placeholder": {
83
- "type": "string"
83
+ "type": "string",
84
+ "description": "Placeholder text shown in the property input field when it is empty. Can be used to show example input."
84
85
  }
85
86
  }
86
87
  },
@@ -101,17 +102,17 @@
101
102
  "number",
102
103
  "boolean"
103
104
  ],
104
- "description": "The value of a control field."
105
+ "description": "Default value to be used if the user does not provide a value or if the type is Hidden."
105
106
  },
106
107
  "description": {
107
108
  "$id": "#/properties/property/description",
108
109
  "type": "string",
109
- "description": "The description of a control field."
110
+ "description": "Hint text shown below the property input field."
110
111
  },
111
112
  "label": {
112
113
  "$id": "#/properties/property/label",
113
114
  "type": "string",
114
- "description": "The label of a control field."
115
+ "description": "Label text shown above the property input field."
115
116
  },
116
117
  "type": {
117
118
  "$id": "#/properties/property/type",
@@ -121,12 +122,12 @@
121
122
  "editable": {
122
123
  "$id": "#/properties/property/editable",
123
124
  "type": "boolean",
124
- "description": "Indicates whether a control field is editable or not."
125
+ "description": "Defines whether users can edit the property in the properties panel. By default, all non-hidden properties are editable."
125
126
  },
126
127
  "choices": {
127
128
  "$id": "#/properties/property/choices",
128
129
  "type": "array",
129
- "description": "The choices for dropdown fields.",
130
+ "description": "List of choices for a dropdown field.",
130
131
  "default": [],
131
132
  "items": {
132
133
  "$id": "#/properties/property/choices/item",
@@ -136,12 +137,12 @@
136
137
  "name": {
137
138
  "$id": "#/properties/property/choices/item/name",
138
139
  "type": "string",
139
- "description": "The name of a choice."
140
+ "description": "Display name for a choice in a dropdown field. Shown to the user."
140
141
  },
141
142
  "value": {
142
143
  "$id": "#/properties/property/choices/item/value",
143
144
  "type": "string",
144
- "description": "The value of a choice."
145
+ "description": "Value for a choice in a dropdown field. Stored in the XML."
145
146
  },
146
147
  "condition": {
147
148
  "$ref": "condition.json#/properties/condition"
@@ -156,7 +157,7 @@
156
157
  "constraints": {
157
158
  "$id": "#/properties/property/constraints",
158
159
  "type": "object",
159
- "description": "The validation constraints of a control field.",
160
+ "description": "Object that contains rules to validate user input to the template.",
160
161
  "allOf": [
161
162
  { "$ref": "examples.json#/constraints" }
162
163
  ],
@@ -178,7 +179,7 @@
178
179
  },
179
180
  "pattern": {
180
181
  "$id": "#/properties/property/constraints/pattern",
181
- "description": "A regular expression pattern for a constraint.",
182
+ "description": "String or object that defines a regular expression that the user's input must match.",
182
183
  "oneOf": [
183
184
  {
184
185
  "type": "object",
@@ -187,12 +188,12 @@
187
188
  "value": {
188
189
  "$id": "#/properties/property/constraints/pattern/value",
189
190
  "type": "string",
190
- "description": "The regular expression of a pattern."
191
+ "description": "The value of the regular expression."
191
192
  },
192
193
  "message": {
193
194
  "$id": "#/properties/property/constraints/pattern/message",
194
195
  "type": "string",
195
- "description": "The validation message of a pattern."
196
+ "description": "Custom error message to show when the user's input does not match the regular expression."
196
197
  }
197
198
  }
198
199
  },
@@ -206,7 +207,7 @@
206
207
  "group": {
207
208
  "$id": "#/properties/property/group",
208
209
  "type": "string",
209
- "description": "The custom group of a control field."
210
+ "description": "Group in the properties panel that the property belongs to."
210
211
  }
211
212
  }
212
213
  }
@@ -6,25 +6,30 @@
6
6
  "properties"
7
7
  ],
8
8
  "properties": {
9
+ "$schema": {
10
+ "$id": "#/$schema",
11
+ "type": "string",
12
+ "description": "Reference to the Element Template JSON schema this document follows."
13
+ },
9
14
  "name": {
10
15
  "$id": "#/name",
11
16
  "type": "string",
12
- "description": "The name of the element template."
17
+ "description": "Template name. Shown during template selection and editing of a templated element. Required."
13
18
  },
14
19
  "id": {
15
20
  "$id": "#/id",
16
21
  "type": "string",
17
- "description": "The identifier of the element template."
22
+ "description": "Template identifier. Required."
18
23
  },
19
24
  "description": {
20
25
  "$id": "#/description",
21
26
  "type": "string",
22
- "description": "The description of the element template."
27
+ "description": "Template description. Shown during template selection and editing of a templated element."
23
28
  },
24
29
  "version": {
25
30
  "$id": "#/version",
26
31
  "type": "integer",
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
+ "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 versions are different."
28
33
  },
29
34
  "isDefault": {
30
35
  "$id": "#/isDefault",
@@ -34,7 +39,7 @@
34
39
  "deprecated": {
35
40
  "$id": "#/deprecated",
36
41
  "type": ["boolean", "object"],
37
- "description": "Indicates whether the element template is deprecated.",
42
+ "description": "Marks the template as deprecated. Value can be either a boolean or an object with a message and a link to migration documentation.",
38
43
  "properties": {
39
44
  "message": {
40
45
  "$id": "#/deprecated/message",
@@ -45,14 +50,14 @@
45
50
  "$id": "#/deprecated/documentationRef",
46
51
  "type": "string",
47
52
  "pattern": "^(https|http)://.*",
48
- "description": "Optional link to migration documentation."
53
+ "description": "URL pointing to template documentation. Must be a valid http(s) URL."
49
54
  }
50
55
  }
51
56
  },
52
57
  "appliesTo": {
53
58
  "$id": "#/appliesTo",
54
59
  "type": "array",
55
- "description": "List of BPMN types the template can be applied to.",
60
+ "description": "List of BPMN types the template can be applied to. Required.",
56
61
  "default": [],
57
62
  "items": {
58
63
  "$id": "#/appliesTo/items",
@@ -68,7 +73,7 @@
68
73
  "elementType": {
69
74
  "$id": "#/elementType",
70
75
  "type": "object",
71
- "description": "The BPMN type the element will be transformed into.",
76
+ "description": "Object that sets the type of the element. Some properties require a specific value for elementType.",
72
77
  "default": {},
73
78
  "required": [
74
79
  "value"
@@ -78,6 +83,7 @@
78
83
  "$id": "#/elementType/value",
79
84
  "type": "string",
80
85
  "pattern": "^[\\w\\d]+:[\\w\\d]+$",
86
+ "description": "Specifies the target BPMN element type. The element is replaced with the specified type when a user applies the template. Required if using elementType.",
81
87
  "allOf": [
82
88
  {
83
89
  "$ref": "examples.json#/elementType"
@@ -96,14 +102,9 @@
96
102
  "$id": "#/keywords",
97
103
  "type": "array",
98
104
  "items": { "type": "string" },
99
- "description": "List of keywords to describe the element template.",
105
+ "description": "List of keywords to help users find the template. Used in search and filtering, but not displayed in the UI.",
100
106
  "default": []
101
107
  },
102
- "entriesVisible": {
103
- "$id": "#/entriesVisible",
104
- "type": "boolean",
105
- "description": "Select whether non-template entries are visible in the properties panel."
106
- },
107
108
  "groups": {
108
109
  "$ref": "groups.json"
109
110
  },
@@ -9,19 +9,21 @@
9
9
  "type": {
10
10
  "$id": "#/condition/type",
11
11
  "const": "simple",
12
- "description": "The type of the condition.",
12
+ "description": "Defines the type of the condition (always \"simple\").",
13
13
  "default": "simple"
14
14
  },
15
15
  "property": {
16
16
  "$id": "#/condition/property",
17
17
  "type": "string",
18
- "description": "The id of the property to check."
18
+ "description": "Reference to the property used to evaluate the condition."
19
19
  }
20
20
  },
21
21
  "oneOf": [
22
22
  {
23
+ "description": "Checks if the referenced property's value is in the list of values defined in the condition.",
23
24
  "properties": {
24
25
  "equals": {
26
+ "description": "Checks if the referenced property's value is equal to the value defined in the condition.",
25
27
  "type": [
26
28
  "string",
27
29
  "number",
@@ -53,7 +55,7 @@
53
55
  "properties": {
54
56
  "isActive": {
55
57
  "type": "boolean",
56
- "description": "For `true`, activates the property when given property is active"
58
+ "description": "Checks if the referenced property is currently active and not hidden by other conditions."
57
59
  }
58
60
  },
59
61
  "required": [
@@ -99,11 +101,11 @@
99
101
  "properties": {
100
102
  "id": {
101
103
  "type": "string",
102
- "description": "Unique identifier of the property."
104
+ "description": "Unique identifier of the property. Can be used to, for example, reference the property for checks."
103
105
  },
104
106
  "condition": {
105
107
  "type": "object",
106
- "description": "Condition(s) to activate the binding.",
108
+ "description": "Object that defines when a property should be displayed in the properties panel and its value should be included in the XML.",
107
109
  "allOf": [
108
110
  {
109
111
  "$ref": "examples.json#/condition"
@@ -121,7 +123,8 @@
121
123
  "items": {
122
124
  "$ref": "#/definitions/condition"
123
125
  },
124
- "minItems": 1
126
+ "minItems": 1,
127
+ "description": "List of conditions that must all be met for the property to be active."
125
128
  }
126
129
  },
127
130
  "required": [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$id": "#/groups",
3
3
  "type": "array",
4
- "description": "Custom fields can be ordered together via groups.",
4
+ "description": "List of custom groups to organize related fields in the properties panel.",
5
5
  "allOf": [
6
6
  {
7
7
  "$ref": "examples.json#/groups"
@@ -19,12 +19,12 @@
19
19
  "id": {
20
20
  "$id": "#/groups/group/id",
21
21
  "type": "string",
22
- "description": "The id of the custom group"
22
+ "description": "Uniquely identifies a group object. Required if using groups."
23
23
  },
24
24
  "label": {
25
25
  "$id": "#/groups/group/label",
26
26
  "type": "string",
27
- "description": "The label of the custom group"
27
+ "description": "The label of the group, shown as a section header in the properties panel. Required if using groups."
28
28
  }
29
29
  }
30
30
  }