Skip to content

Commit

Permalink
feat(zeebe): add documentationRef
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Kiefer committed Mar 21, 2022
1 parent bda0098 commit 8cff570
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,14 @@
}
}
}
},
"documentationRef": {
"$id": "#/documentaionRef",
"type": "string",
"pattern": "^(https|http)://.*",
"errorMessage": {
"pattern": "Malformed documentation URL, must match \"^(https|http)://.*\""
}
}
},
"errorMessage": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const template = {
'name': 'Documentation Ref',
'id': 'com.camunda.example.DocumentationRef',
'appliesTo': [
'bpmn:Task'
],
'properties': [],
'documentationRef': 'https://www.example.com/myTask'
};

export const errors = null;
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
export const template = {
'name': 'Documentation Ref',
'id': 'com.camunda.example.DocumentationRef',
'appliesTo': [
'bpmn:Task'
],
'properties': [],
'documentationRef': 'foo'
};

export const errors = [
{
keyword: 'errorMessage',
dataPath: '/documentationRef',
schemaPath: '#/allOf/0/properties/documentationRef/errorMessage',
params: {
errors: [
{
keyword: 'pattern',
dataPath: '/documentationRef',
schemaPath: '#/allOf/0/properties/documentationRef/pattern',
params: { pattern: '^(https|http)://.*' },
message: 'should match pattern "^(https|http)://.*"',
emUsed: true
}
]
},
message: 'Malformed documentation URL, must match "^(https|http)://.*"'
},
{
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'
}
];
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ describe('validation', function() {
testTemplate('optional-invalid-not-empty');


testTemplate('documentation-ref');


testTemplate('invalid-documentation-ref');


describe('property type - binding type', function() {

testTemplate('invalid-property-type');
Expand Down

0 comments on commit 8cff570

Please sign in to comment.