From 3dbaa30cf58cd38784c3a7bdb86ddea55d51f20c Mon Sep 17 00:00:00 2001 From: Maciej Barelkowski Date: Fri, 27 Oct 2023 12:24:56 +0200 Subject: [PATCH] feat: remove `zeebe:taskDefinition:retries` binding The binding was never implemented in bpmn-js-element-templates. It is unnecessary with introduction of `zeebe:taskDefinition` binding. BREAKING CHANGE: `zeebe:taskDefinition:retries` binding is removed. --- .../src/defs/examples.json | 3 - .../src/defs/properties.json | 2 - .../test/fixtures/cloud-rest-connector.js | 7 -- .../test/fixtures/invalid-binding-type.js | 1 - ...alid-zeebe-task-definition-retries-type.js | 78 ------------------- .../test/spec/validationSpec.js | 3 - 6 files changed, 94 deletions(-) delete mode 100644 packages/zeebe-element-templates-json-schema/test/fixtures/invalid-zeebe-task-definition-retries-type.js diff --git a/packages/zeebe-element-templates-json-schema/src/defs/examples.json b/packages/zeebe-element-templates-json-schema/src/defs/examples.json index d616903..8637678 100644 --- a/packages/zeebe-element-templates-json-schema/src/defs/examples.json +++ b/packages/zeebe-element-templates-json-schema/src/defs/examples.json @@ -17,9 +17,6 @@ "type": "zeebe:property", "name": "property" }, - { - "type": "zeebe:taskDefinition:retries" - }, { "type": "zeebe:taskDefinition:type" }, diff --git a/packages/zeebe-element-templates-json-schema/src/defs/properties.json b/packages/zeebe-element-templates-json-schema/src/defs/properties.json index ed88505..6b3e206 100644 --- a/packages/zeebe-element-templates-json-schema/src/defs/properties.json +++ b/packages/zeebe-element-templates-json-schema/src/defs/properties.json @@ -52,7 +52,6 @@ "zeebe:output", "zeebe:property", "zeebe:taskHeader", - "zeebe:taskDefinition:retries", "zeebe:taskDefinition:type", "bpmn:Message#property", "bpmn:Message#zeebe:subscription#property", @@ -321,7 +320,6 @@ "enum": [ "property", "zeebe:taskDefinition:type", - "zeebe:taskDefinition:retries", "zeebe:input", "zeebe:output", "zeebe:property", diff --git a/packages/zeebe-element-templates-json-schema/test/fixtures/cloud-rest-connector.js b/packages/zeebe-element-templates-json-schema/test/fixtures/cloud-rest-connector.js index cb9f12f..c032490 100644 --- a/packages/zeebe-element-templates-json-schema/test/fixtures/cloud-rest-connector.js +++ b/packages/zeebe-element-templates-json-schema/test/fixtures/cloud-rest-connector.js @@ -13,13 +13,6 @@ export const template = { 'type': 'zeebe:taskDefinition:type' } }, - { - 'type': 'Hidden', - 'value': '5', - 'binding': { - 'type': 'zeebe:taskDefinition:retries' - } - }, { 'label': 'REST Endpoint URL', 'description': 'Specify the url of the REST API to talk to.', diff --git a/packages/zeebe-element-templates-json-schema/test/fixtures/invalid-binding-type.js b/packages/zeebe-element-templates-json-schema/test/fixtures/invalid-binding-type.js index 527df5e..894f545 100644 --- a/packages/zeebe-element-templates-json-schema/test/fixtures/invalid-binding-type.js +++ b/packages/zeebe-element-templates-json-schema/test/fixtures/invalid-binding-type.js @@ -40,7 +40,6 @@ export const errors = [ allowedValues: [ 'property', 'zeebe:taskDefinition:type', - 'zeebe:taskDefinition:retries', 'zeebe:input', 'zeebe:output', 'zeebe:property', diff --git a/packages/zeebe-element-templates-json-schema/test/fixtures/invalid-zeebe-task-definition-retries-type.js b/packages/zeebe-element-templates-json-schema/test/fixtures/invalid-zeebe-task-definition-retries-type.js deleted file mode 100644 index 3a86841..0000000 --- a/packages/zeebe-element-templates-json-schema/test/fixtures/invalid-zeebe-task-definition-retries-type.js +++ /dev/null @@ -1,78 +0,0 @@ -export const template = { - 'name': 'InvalidZeebeTaskHeaderType', - 'id': 'com.camunda.example.InvalidZeebeTaskHeaderType', - 'appliesTo': [ - 'bpmn:Task' - ], - 'properties': [ - { - 'label': 'foo', - 'type': 'Text', - 'binding': { - 'type': 'zeebe:taskDefinition:retries' - } - }, - { - 'label': 'bar', - 'type': 'Boolean', - 'binding': { - 'type': 'zeebe:taskDefinition:retries' - } - } - ] -}; - -export const errors = [ - { - 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:retries"; 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: '', - 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' - } -]; diff --git a/packages/zeebe-element-templates-json-schema/test/spec/validationSpec.js b/packages/zeebe-element-templates-json-schema/test/spec/validationSpec.js index 9b50630..6e9e66b 100644 --- a/packages/zeebe-element-templates-json-schema/test/spec/validationSpec.js +++ b/packages/zeebe-element-templates-json-schema/test/spec/validationSpec.js @@ -201,9 +201,6 @@ describe('validation', function() { testTemplate('invalid-zeebe-task-header-type'); - testTemplate('invalid-zeebe-task-definition-retries-type'); - - testTemplate('invalid-zeebe-task-definition-type-type');