diff --git a/packages/element-templates-json-schema-shared/src/defs/condition.json b/packages/element-templates-json-schema-shared/src/defs/condition.json index 855aeea..b5e6243 100644 --- a/packages/element-templates-json-schema-shared/src/defs/condition.json +++ b/packages/element-templates-json-schema-shared/src/defs/condition.json @@ -63,36 +63,16 @@ ] }, "conditionDependingOnId": { - "anyOf": [ - { - "required": [ - "property" - ], - "properties": { - "property": { - "const": { - "$data": "2/id" - } - } - } - }, - { - "required": [ - "allMatch" - ], - "allMatch": { - "contains": { - "properties": { - "property": { - "const": { - "$data": "2/id" - } - } - } - } + "required": [ + "property" + ], + "properties": { + "property": { + "const": { + "$data": "2/id" } } - ] + } } }, "allOf": [ @@ -114,31 +94,6 @@ "required": [ "condition" ] } } - }, - { - "$comment": "property#condition should not depend on property#id", - "if": { - "required": [ - "id", - "choices" - ], - "properties": { - "choices": { - "contains": { - "properties": { - "condition": { - "$ref": "#/definitions/conditionDependingOnId" - } - } - } - } - } - }, - "then": { - "not": { - "required": [ "choices" ] - } - } } ], "properties": { diff --git a/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-allMatch.js b/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-allMatch.js index 58cc35a..3825b6e 100644 --- a/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-allMatch.js +++ b/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-allMatch.js @@ -26,44 +26,5 @@ export const template = { ] }; -export const errors = [ - { - keyword: 'errorMessage', - dataPath: '/properties/0', - schemaPath: '#/allOf/0/items/allOf/1/allOf/0/then/errorMessage', - params: { - errors: [ - { - keyword: 'not', - dataPath: '/properties/0', - schemaPath: '#/allOf/0/items/allOf/1/allOf/0/then/not', - params: {}, - message: 'should NOT be valid', - emUsed: true - } - ] - }, - message: 'Invalid condition.property, must be different than property.id' - }, - { - keyword: 'if', - dataPath: '/properties/0', - schemaPath: '#/allOf/0/items/allOf/1/allOf/0/if', - params: { failingKeyword: 'then' }, - message: 'should match "then" schema' - }, - { - keyword: 'type', - dataPath: '', - schemaPath: '#/oneOf/1/type', - params: { type: 'array' }, - message: 'should be array' - }, - { - keyword: 'oneOf', - dataPath: '', - schemaPath: '#/oneOf', - params: { passingSchemas: null }, - message: 'should match exactly one schema in oneOf' - } -]; +// TODO(@barmac): should report errors +export const errors = null; diff --git a/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-dropdown-choices.js b/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-dropdown-choices.js index d398fe3..fa6f889 100644 --- a/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-dropdown-choices.js +++ b/packages/zeebe-element-templates-json-schema/test/fixtures/condition-on-itself-dropdown-choices.js @@ -94,44 +94,5 @@ export const template = { ] }; -export const errors = [ - { - keyword: 'errorMessage', - dataPath: '/properties/0', - schemaPath: '#/allOf/0/items/allOf/1/allOf/1/then/errorMessage', - params: { - errors: [ - { - keyword: 'not', - dataPath: '/properties/0', - schemaPath: '#/allOf/0/items/allOf/1/allOf/1/then/not', - params: {}, - message: 'should NOT be valid', - emUsed: true - } - ] - }, - message: 'Invalid condition.property, must be different than property.id' - }, - { - keyword: 'if', - dataPath: '/properties/0', - schemaPath: '#/allOf/0/items/allOf/1/allOf/1/if', - params: { failingKeyword: 'then' }, - message: 'should match "then" schema' - }, - { - keyword: 'type', - dataPath: '', - schemaPath: '#/oneOf/1/type', - params: { type: 'array' }, - message: 'should be array' - }, - { - keyword: 'oneOf', - dataPath: '', - schemaPath: '#/oneOf', - params: { passingSchemas: null }, - message: 'should match exactly one schema in oneOf' - } -]; \ No newline at end of file +// TODO(@barmac): should report errors +export const errors = null; \ No newline at end of file