-
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(zeebe): add zeebe:LinkedResource
- Loading branch information
Showing
8 changed files
with
284 additions
and
5 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
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
77 changes: 77 additions & 0 deletions
77
...ges/zeebe-element-templates-json-schema/test/fixtures/linked-resource-invalid-property.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,77 @@ | ||
export const template = { | ||
'$schema': 'https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json', | ||
'name': 'linkedResource', | ||
'id': 'linkedResource', | ||
'version': 1, | ||
'appliesTo': [ | ||
'bpmn:Task' | ||
], | ||
'elementType': { | ||
'value': 'bpmn:ServiceTask' | ||
}, | ||
'properties': [ | ||
{ | ||
'type': 'String', | ||
'binding': { | ||
'type': 'zeebe:linkedResource', | ||
'linkName': 'myLink', | ||
'property': 'invalidProperty' | ||
} | ||
} | ||
] | ||
}; | ||
|
||
export const errors = [ | ||
{ | ||
'dataPath': '/properties/0/binding/property', | ||
'keyword': 'errorMessage', | ||
'message': 'invalid binding.property "invalidProperty"; must be any of { resourceId, resourceType, bindingType, versionTag }', | ||
'params': { | ||
'errors': [ | ||
{ | ||
'dataPath': '/properties/0/binding/property', | ||
'emUsed': true, | ||
'keyword': 'enum', | ||
'message': 'should be equal to one of the allowed values', | ||
'params': { | ||
'allowedValues': [ | ||
'resourceId', | ||
'resourceType', | ||
'bindingType', | ||
'versionTag' | ||
], | ||
}, | ||
'schemaPath': '#/allOf/1/items/allOf/10/then/properties/binding/properties/property/enum' | ||
}, | ||
], | ||
}, | ||
'schemaPath': '#/allOf/1/items/allOf/10/then/properties/binding/properties/property/errorMessage' | ||
}, | ||
{ | ||
'dataPath': '/properties/0', | ||
'keyword': 'if', | ||
'message': 'should match "then" schema', | ||
'params': { | ||
'failingKeyword': 'then', | ||
}, | ||
'schemaPath': '#/allOf/1/items/allOf/10/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', | ||
} | ||
]; |
61 changes: 61 additions & 0 deletions
61
...ges/zeebe-element-templates-json-schema/test/fixtures/linked-resource-missing-linkName.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,61 @@ | ||
export const template = { | ||
'$schema': 'https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json', | ||
'name': 'linkedResource', | ||
'id': 'linkedResource', | ||
'version': 1, | ||
'appliesTo': [ | ||
'bpmn:Task' | ||
], | ||
'elementType': { | ||
'value': 'bpmn:ServiceTask' | ||
}, | ||
'properties': [ | ||
{ | ||
'type': 'String', | ||
'value': 'RPA', | ||
'binding': { | ||
'type': 'zeebe:linkedResource', | ||
'property': 'resourceType' | ||
} | ||
} | ||
] | ||
}; | ||
|
||
export const errors = [ | ||
{ | ||
'dataPath': '/properties/0/binding', | ||
'keyword': 'required', | ||
'message': "should have required property 'linkName'", | ||
'params': { | ||
'missingProperty': 'linkName', | ||
}, | ||
'schemaPath': '#/allOf/1/items/allOf/10/then/properties/binding/required' | ||
}, | ||
{ | ||
'dataPath': '/properties/0', | ||
'keyword': 'if', | ||
'message': 'should match "then" schema', | ||
'params': { | ||
'failingKeyword': 'then', | ||
}, | ||
'schemaPath': '#/allOf/1/items/allOf/10/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' | ||
} | ||
]; |
61 changes: 61 additions & 0 deletions
61
packages/zeebe-element-templates-json-schema/test/fixtures/linked-resource.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,61 @@ | ||
export const template = { | ||
'$schema': 'https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json', | ||
'name': 'linkedResource', | ||
'id': 'linkedResource', | ||
'version': 1, | ||
'appliesTo': [ | ||
'bpmn:Task' | ||
], | ||
'elementType': { | ||
'value': 'bpmn:ServiceTask' | ||
}, | ||
'properties': [ | ||
{ | ||
'type': 'String', | ||
'value': 'RPA', | ||
'binding': { | ||
'type': 'zeebe:linkedResource', | ||
'linkName': 'persistedLink', | ||
'property': 'resourceType' | ||
} | ||
}, | ||
{ | ||
'type': 'String', | ||
'feel': 'optional', | ||
'binding': { | ||
'type': 'zeebe:linkedResource', | ||
'linkName': 'persistedLink', | ||
'property': 'resourceId' | ||
} | ||
}, | ||
{ | ||
'type': 'String', | ||
'value': 'versionTag', | ||
'binding': { | ||
'type': 'zeebe:linkedResource', | ||
'linkName': 'persistedLink', | ||
'property': 'bindingType' | ||
} | ||
}, | ||
{ | ||
'type': 'String', | ||
'value': 'v123', | ||
'binding': { | ||
'type': 'zeebe:linkedResource', | ||
'linkName': 'persistedLink', | ||
'property': 'versionTag' | ||
} | ||
}, | ||
{ | ||
'type': 'String', | ||
'value': 'RPA', | ||
'binding': { | ||
'type': 'zeebe:linkedResource', | ||
'linkName': 'removedLink', | ||
'property': 'resourceType' | ||
} | ||
} | ||
] | ||
}; | ||
|
||
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