Skip to content

Commit

Permalink
chore: migrate to latest ajv version
Browse files Browse the repository at this point in the history
  • Loading branch information
marstamm committed Feb 9, 2024
1 parent 8b0dc54 commit 3f3ce60
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This will print detailed information about errors inside the sample:
"params": {
"type": "object"
},
"message": "should be object",
"message": "must be object",
"dataPointer": {
"value": {
"line": 0,
Expand Down
2 changes: 1 addition & 1 deletion lib/helper/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function wrapRawErrors(error) {
}

function setDataPointer(error, dataPointerMap) {
const dataPath = error.dataPath;
const dataPath = error.instancePath;

const pointer = dataPointerMap[dataPath];

Expand Down
18 changes: 9 additions & 9 deletions test/spec/validationSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ describe('Validator', function() {
expect(object).to.equal(sample);

expect(normalizedErrors).to.eql([
{ message: 'should be object', params: { type: 'object' } },
{ message: 'should be string', params: { type: 'string' } },
{ message: 'must be object', params: { type: 'object' } },
{ message: 'must be string', params: { type: 'string' } },
{ message: 'invalid item for "elementType", should contain namespaced property, example: "bpmn:Task"' },
{ message: 'missing elementType value' },
{ message: 'should match exactly one schema in oneOf',
{ message: 'must match exactly one schema in oneOf',
params: { passingSchemas: null } }
]);
});
Expand Down Expand Up @@ -257,7 +257,7 @@ describe('Validator', function() {
message: 'property.binding "zeebe:taskHeader" requires key'
},
{
message: 'should be string',
message: 'must be string',
params : {
type: 'string'
}
Expand All @@ -266,7 +266,7 @@ describe('Validator', function() {
message: 'feel is only supported for "String", "Text", "Number" and "Boolean" type'
},
{
message: 'should be equal to one of the allowed values',
message: 'must be equal to one of the allowed values',
params: {
allowedValues: [
'optional',
Expand All @@ -275,7 +275,7 @@ describe('Validator', function() {
}
},
{
message: 'should be equal to one of the allowed values',
message: 'must be equal to one of the allowed values',
params: {
allowedValues: [
'optional',
Expand All @@ -294,14 +294,14 @@ describe('Validator', function() {
message: 'Malformed icon source, must be a valid HTTP(s) or data URL'
},
{
message: 'should be string',
message: 'must be string',
params: {
type: 'string'
}
},
{ message: 'should be array', params: { type: 'array' } },
{ message: 'must be array', params: { type: 'array' } },
{
message: 'should match exactly one schema in oneOf',
message: 'must match exactly one schema in oneOf',
params: { passingSchemas: null }
}
]);
Expand Down

0 comments on commit 3f3ce60

Please sign in to comment.