Skip to content

Commit 1698a51

Browse files
yT0n1philippfromme
authored andcommitted
feat: add outputCollection cannot be Feel expression error
1 parent a9ea00b commit 1698a51

File tree

2 files changed

+60
-33
lines changed

2 files changed

+60
-33
lines changed

packages/zeebe-element-templates-json-schema/src/error-messages.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,5 +481,20 @@
481481
"value"
482482
],
483483
"errorMessage": "Invalid value for priority. Must be between 0 and 100"
484+
},
485+
{
486+
"path": [
487+
"definitions",
488+
"properties",
489+
"allOf",
490+
1,
491+
"items",
492+
"allOf",
493+
23,
494+
"allOf",
495+
1,
496+
"then"
497+
],
498+
"errorMessage": "Property \"outputCollection\" cannot be a FEEL expression"
484499
}
485500
]

packages/zeebe-element-templates-json-schema/test/fixtures/ad-hoc/invalid-feel-output-collection.js

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,39 +26,51 @@ export const template = {
2626
]
2727
};
2828

29-
export const errors = [
30-
{
31-
keyword: 'not',
32-
dataPath: '/properties/1',
33-
schemaPath: '#/allOf/1/items/allOf/23/allOf/1/then/not',
34-
params: {},
35-
message: 'should NOT be valid'
36-
},
37-
{
38-
keyword: 'if',
39-
dataPath: '/properties/1',
40-
schemaPath: '#/allOf/1/items/allOf/23/allOf/1/if',
41-
params: {
42-
failingKeyword: 'then'
29+
export const errors = [
30+
{
31+
keyword: "errorMessage",
32+
dataPath: "/properties/1",
33+
schemaPath: "#/allOf/1/items/allOf/23/allOf/1/then/errorMessage",
34+
params: {
35+
errors: [
36+
{
37+
keyword: "not",
38+
dataPath: "/properties/1",
39+
schemaPath: "#/allOf/1/items/allOf/23/allOf/1/then/not",
40+
params: {},
41+
message: "should NOT be valid",
42+
emUsed: true
43+
}
44+
]
45+
},
46+
message: "Property \"outputCollection\" cannot be a FEEL expression"
4347
},
44-
message: 'should match "then" schema'
45-
},
46-
{
47-
keyword: 'type',
48-
dataPath: '',
49-
schemaPath: '#/oneOf/1/type',
50-
params: {
51-
type: 'array'
48+
{
49+
keyword: "if",
50+
dataPath: "/properties/1",
51+
schemaPath: "#/allOf/1/items/allOf/23/allOf/1/if",
52+
params: {
53+
failingKeyword: "then"
54+
},
55+
message: "should match \"then\" schema"
5256
},
53-
message: 'should be array'
54-
},
55-
{
56-
keyword: 'oneOf',
57-
dataPath: '',
58-
schemaPath: '#/oneOf',
59-
params: {
60-
passingSchemas: null
57+
{
58+
keyword: "type",
59+
dataPath: "",
60+
schemaPath: "#/oneOf/1/type",
61+
params: {
62+
type: "array"
63+
},
64+
message: "should be array"
6165
},
62-
message: 'should match exactly one schema in oneOf'
63-
}
64-
];
66+
{
67+
keyword: "oneOf",
68+
dataPath: "",
69+
schemaPath: "#/oneOf",
70+
params: {
71+
passingSchemas: null
72+
},
73+
message: "should match exactly one schema in oneOf"
74+
}
75+
]
76+
;

0 commit comments

Comments
 (0)