-
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.
- Loading branch information
1 parent
4216f8d
commit 26a2f9e
Showing
6 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
packages/zeebe-element-templates-json-schema/src/defs/engines.json
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,19 @@ | ||
{ | ||
"$id": "#/engines", | ||
"type": "object", | ||
"description": "List of engines and their versions compatible with this version of the template.", | ||
"default": {}, | ||
"examples": [ | ||
{ | ||
"camunda": "*" | ||
} | ||
], | ||
"properties": { | ||
"camunda": { | ||
"$id": "#/engines/camunda", | ||
"type": "string", | ||
"description": "List of compatible Camunda 8 versions. Use semantic versioning. You can skip patch versions.", | ||
"default": "" | ||
} | ||
} | ||
} |
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
41 changes: 41 additions & 0 deletions
41
packages/zeebe-element-templates-json-schema/test/fixtures/engines-invalid-version.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,41 @@ | ||
export const template = { | ||
'name': 'Engines Invalid Versions', | ||
'id': 'foo', | ||
'appliesTo': [ | ||
'bpmn:Task' | ||
], | ||
'engines': { | ||
'camunda': [ '8.5' ], | ||
}, | ||
'properties': [], | ||
}; | ||
|
||
export const errors = [ | ||
{ | ||
dataPath: '/engines/camunda', | ||
keyword: 'type', | ||
message: 'should be string', | ||
params: { | ||
type: 'string' | ||
}, | ||
schemaPath: '#/properties/engines/properties/camunda/type' | ||
}, | ||
{ | ||
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' | ||
} | ||
]; |
39 changes: 39 additions & 0 deletions
39
packages/zeebe-element-templates-json-schema/test/fixtures/engines-invalid.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,39 @@ | ||
export const template = { | ||
'name': 'Engines Invalid', | ||
'id': 'foo', | ||
'appliesTo': [ | ||
'bpmn:Task' | ||
], | ||
'engines': '8.5', | ||
'properties': [], | ||
}; | ||
|
||
export const errors = [ | ||
{ | ||
dataPath: '/engines', | ||
keyword: 'type', | ||
message: 'should be object', | ||
params: { | ||
type: 'object' | ||
}, | ||
schemaPath: '#/properties/engines/type' | ||
}, | ||
{ | ||
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' | ||
} | ||
]; |
13 changes: 13 additions & 0 deletions
13
packages/zeebe-element-templates-json-schema/test/fixtures/engines.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,13 @@ | ||
export const template = { | ||
'name': 'Engines Valid', | ||
'id': 'foo', | ||
'appliesTo': [ | ||
'bpmn:Task' | ||
], | ||
'engines': { | ||
'camunda': '8.5' | ||
}, | ||
'properties': [], | ||
}; | ||
|
||
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