@camunda/element-templates-json-schema-shared 0.9.0 → 0.10.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 +2 -2
- package/src/base-error-messages.json +32 -2
- package/src/defs/base-properties.json +4 -8
- package/src/defs/condition.json +107 -22
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.10.0",
|
|
4
4
|
"description": "Shared schema definitions used within element-templates-json-schema",
|
|
5
5
|
"files": [
|
|
6
6
|
"src"
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"camunda"
|
|
17
17
|
],
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "ad75f695f0459880535544cfbd08bffb01609f41"
|
|
20
20
|
}
|
|
@@ -139,8 +139,8 @@
|
|
|
139
139
|
"allOf",
|
|
140
140
|
0,
|
|
141
141
|
"items",
|
|
142
|
-
"
|
|
143
|
-
|
|
142
|
+
"allOf",
|
|
143
|
+
1,
|
|
144
144
|
"definitions",
|
|
145
145
|
"condition"
|
|
146
146
|
],
|
|
@@ -149,5 +149,35 @@
|
|
|
149
149
|
"property": "missing property name for condition"
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"path": [
|
|
155
|
+
"definitions",
|
|
156
|
+
"properties",
|
|
157
|
+
"allOf",
|
|
158
|
+
0,
|
|
159
|
+
"items",
|
|
160
|
+
"allOf",
|
|
161
|
+
1,
|
|
162
|
+
"allOf",
|
|
163
|
+
0,
|
|
164
|
+
"then"
|
|
165
|
+
],
|
|
166
|
+
"errorMessage": "Invalid condition.property, must be different than property.id"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"path": [
|
|
170
|
+
"definitions",
|
|
171
|
+
"properties",
|
|
172
|
+
"allOf",
|
|
173
|
+
0,
|
|
174
|
+
"items",
|
|
175
|
+
"allOf",
|
|
176
|
+
1,
|
|
177
|
+
"allOf",
|
|
178
|
+
1,
|
|
179
|
+
"then"
|
|
180
|
+
],
|
|
181
|
+
"errorMessage": "Invalid condition.property, must be different than property.id"
|
|
152
182
|
}
|
|
153
183
|
]
|
|
@@ -24,13 +24,12 @@
|
|
|
24
24
|
"choices"
|
|
25
25
|
]
|
|
26
26
|
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"$ref": "condition.json"
|
|
27
30
|
}
|
|
28
31
|
],
|
|
29
32
|
"properties": {
|
|
30
|
-
"id": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"description": "Unique identifier of the property."
|
|
33
|
-
},
|
|
34
33
|
"value": {
|
|
35
34
|
"$id": "#/properties/property/value",
|
|
36
35
|
"type": [
|
|
@@ -80,7 +79,7 @@
|
|
|
80
79
|
"description": "The value of a choice."
|
|
81
80
|
},
|
|
82
81
|
"condition": {
|
|
83
|
-
"$ref": "condition.json"
|
|
82
|
+
"$ref": "condition.json#/properties/condition"
|
|
84
83
|
}
|
|
85
84
|
},
|
|
86
85
|
"required": [
|
|
@@ -143,9 +142,6 @@
|
|
|
143
142
|
"$id": "#/properties/property/group",
|
|
144
143
|
"type": "string",
|
|
145
144
|
"description": "The custom group of a control field."
|
|
146
|
-
},
|
|
147
|
-
"condition": {
|
|
148
|
-
"$ref": "condition.json"
|
|
149
145
|
}
|
|
150
146
|
}
|
|
151
147
|
}
|
package/src/defs/condition.json
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "#/condition",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"description": "Condition(s) to activate the binding.",
|
|
5
|
-
"allOf": [
|
|
6
|
-
{
|
|
7
|
-
"$ref": "examples.json#/condition"
|
|
8
|
-
}
|
|
9
|
-
],
|
|
10
2
|
"definitions": {
|
|
11
3
|
"condition": {
|
|
12
4
|
"type": "object",
|
|
@@ -69,26 +61,119 @@
|
|
|
69
61
|
]
|
|
70
62
|
}
|
|
71
63
|
]
|
|
64
|
+
},
|
|
65
|
+
"conditionDependingOnId": {
|
|
66
|
+
"anyOf": [
|
|
67
|
+
{
|
|
68
|
+
"required": [
|
|
69
|
+
"property"
|
|
70
|
+
],
|
|
71
|
+
"properties": {
|
|
72
|
+
"property": {
|
|
73
|
+
"const": {
|
|
74
|
+
"$data": "2/id"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"required": [
|
|
81
|
+
"allMatch"
|
|
82
|
+
],
|
|
83
|
+
"allMatch": {
|
|
84
|
+
"contains": {
|
|
85
|
+
"properties": {
|
|
86
|
+
"property": {
|
|
87
|
+
"const": {
|
|
88
|
+
"$data": "2/id"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
]
|
|
72
96
|
}
|
|
73
97
|
},
|
|
74
|
-
"
|
|
98
|
+
"allOf": [
|
|
75
99
|
{
|
|
76
|
-
"$
|
|
100
|
+
"$comment": "property#condition should not depend on property#id",
|
|
101
|
+
"if": {
|
|
102
|
+
"required": [
|
|
103
|
+
"id",
|
|
104
|
+
"condition"
|
|
105
|
+
],
|
|
106
|
+
"properties": {
|
|
107
|
+
"condition": {
|
|
108
|
+
"$ref": "#/definitions/conditionDependingOnId"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"then": {
|
|
113
|
+
"not": {
|
|
114
|
+
"required": [ "condition" ]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
77
117
|
},
|
|
78
118
|
{
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"
|
|
119
|
+
"$comment": "property#condition should not depend on property#id",
|
|
120
|
+
"if": {
|
|
121
|
+
"required": [
|
|
122
|
+
"id",
|
|
123
|
+
"choices"
|
|
124
|
+
],
|
|
125
|
+
"properties": {
|
|
126
|
+
"choices": {
|
|
127
|
+
"contains": {
|
|
128
|
+
"properties": {
|
|
129
|
+
"condition": {
|
|
130
|
+
"$ref": "#/definitions/conditionDependingOnId"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
87
135
|
}
|
|
88
136
|
},
|
|
89
|
-
"
|
|
90
|
-
"
|
|
137
|
+
"then": {
|
|
138
|
+
"not": {
|
|
139
|
+
"required": [ "choices" ]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"properties": {
|
|
145
|
+
"id": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"description": "Unique identifier of the property."
|
|
148
|
+
},
|
|
149
|
+
"condition": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"description": "Condition(s) to activate the binding.",
|
|
152
|
+
"allOf": [
|
|
153
|
+
{
|
|
154
|
+
"$ref": "examples.json#/condition"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"oneOf": [
|
|
158
|
+
{
|
|
159
|
+
"$ref": "#/definitions/condition"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"properties": {
|
|
163
|
+
"allMatch": {
|
|
164
|
+
"$id": "#/allMatch",
|
|
165
|
+
"type": "array",
|
|
166
|
+
"items": {
|
|
167
|
+
"$ref": "#/definitions/condition"
|
|
168
|
+
},
|
|
169
|
+
"minItems": 1
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"required": [
|
|
173
|
+
"allMatch"
|
|
174
|
+
]
|
|
175
|
+
}
|
|
91
176
|
]
|
|
92
177
|
}
|
|
93
|
-
|
|
94
|
-
}
|
|
178
|
+
}
|
|
179
|
+
}
|