-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
zeebe:taskDefinition
binding
Related to camunda/camunda-modeler#2936
- Loading branch information
Showing
6 changed files
with
186 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
114 changes: 114 additions & 0 deletions
114
packages/zeebe-element-templates-json-schema/test/fixtures/invalid-zeebe-task-definition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
export const template = { | ||
'name': 'InvalidZeebeTaskHeaderType', | ||
'id': 'com.camunda.example.InvalidZeebeTaskHeaderType', | ||
'appliesTo': [ | ||
'bpmn:Task' | ||
], | ||
'properties': [ | ||
{ | ||
'label': 'foo', | ||
'type': 'Text', | ||
'binding': { | ||
'type': 'zeebe:taskDefinition' | ||
} | ||
}, | ||
{ | ||
'label': 'bar', | ||
'type': 'Boolean', | ||
'binding': { | ||
'type': 'zeebe:taskDefinition' | ||
} | ||
} | ||
] | ||
}; | ||
|
||
export const errors = [ | ||
{ | ||
'dataPath': '/properties/0/binding', | ||
'keyword': 'required', | ||
'message': "should have required property 'property'", | ||
'params': { | ||
'missingProperty': 'property' | ||
}, | ||
'schemaPath': '#/allOf/1/items/properties/binding/allOf/3/then/required' | ||
}, | ||
{ | ||
'dataPath': '/properties/0/binding', | ||
'keyword': 'if', | ||
'message': 'should match "then" schema', | ||
'params': { | ||
'failingKeyword': 'then' | ||
}, | ||
'schemaPath': '#/allOf/1/items/properties/binding/allOf/3/if' | ||
}, | ||
{ | ||
keyword: 'errorMessage', | ||
dataPath: '/properties/1/type', | ||
schemaPath: '#/allOf/1/items/allOf/1/then/properties/type/errorMessage', | ||
params: { | ||
errors: [ | ||
{ | ||
keyword: 'enum', | ||
emUsed: true, | ||
dataPath: '/properties/1/type', | ||
schemaPath: '#/allOf/1/items/allOf/1/then/properties/type/enum', | ||
params: { | ||
'allowedValues': [ | ||
'String', | ||
'Text', | ||
'Hidden', | ||
'Dropdown' | ||
] | ||
}, | ||
message: 'should be equal to one of the allowed values' | ||
} | ||
] | ||
}, | ||
message: 'invalid property type "Boolean" for binding type "zeebe:taskDefinition"; must be any of { String, Text, Hidden, Dropdown }' | ||
}, | ||
{ | ||
keyword: 'if', | ||
dataPath: '/properties/1', | ||
schemaPath: '#/allOf/1/items/allOf/1/if', | ||
params: { | ||
'failingKeyword': 'then' | ||
}, | ||
message: 'should match "then" schema' | ||
}, | ||
{ | ||
'dataPath': '/properties/1/binding', | ||
'keyword': 'required', | ||
'message': "should have required property 'property'", | ||
'params': { | ||
'missingProperty': 'property' | ||
}, | ||
'schemaPath': '#/allOf/1/items/properties/binding/allOf/3/then/required' | ||
}, | ||
{ | ||
'dataPath': '/properties/1/binding', | ||
'keyword': 'if', | ||
'message': 'should match "then" schema', | ||
'params': { | ||
'failingKeyword': 'then' | ||
}, | ||
'schemaPath': '#/allOf/1/items/properties/binding/allOf/3/if' | ||
}, | ||
{ | ||
dataPath: '', | ||
keyword: 'type', | ||
message: 'should be array', | ||
params: { | ||
type: 'array', | ||
}, | ||
schemaPath: '#/oneOf/1/type', | ||
}, | ||
{ | ||
dataPath: '', | ||
keyword: 'oneOf', | ||
message: 'should match exactly one schema in oneOf', | ||
params: { | ||
passingSchemas: null | ||
}, | ||
schemaPath: '#/oneOf' | ||
} | ||
]; |
27 changes: 27 additions & 0 deletions
27
packages/zeebe-element-templates-json-schema/test/fixtures/zeebe-task-definition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
export const template = { | ||
'name': 'InvalidZeebeTaskHeaderType', | ||
'id': 'com.camunda.example.InvalidZeebeTaskHeaderType', | ||
'appliesTo': [ | ||
'bpmn:Task' | ||
], | ||
'properties': [ | ||
{ | ||
'label': 'foo', | ||
'type': 'Text', | ||
'binding': { | ||
'type': 'zeebe:taskDefinition', | ||
'property': 'retries' | ||
} | ||
}, | ||
{ | ||
'label': 'bar', | ||
'type': 'String', | ||
'binding': { | ||
'type': 'zeebe:taskDefinition', | ||
'property': 'type' | ||
} | ||
} | ||
] | ||
}; | ||
|
||
export const errors = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters