Skip to content

Commit

Permalink
fix(zigbee): validation bug
Browse files Browse the repository at this point in the history
Validation of endpoint keys did not work as expected.
  • Loading branch information
RobinBol committed Nov 8, 2023
1 parent c6fa24a commit 78ec9ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions assets/app/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,12 @@
},
"endpoints": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"[0-255]": {
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[0-9]+$"
},
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"clusters": {
Expand All @@ -799,7 +801,6 @@
"type": "number"
}
}
}
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions test/validate-driver-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,9 @@ describe('HomeyLib.App#validate() driver manifest', function() {
});

await assertValidates(app, {
debug: /zigbee\.endpoints should NOT have additional properties/i,
publish: /zigbee\.endpoints should NOT have additional properties/i,
verified: /zigbee\.endpoints should NOT have additional properties/i,
debug: /zigbee\.endpoints should match pattern/i,
publish: /zigbee\.endpoints should match pattern/i,
verified: /zigbee\.endpoints should match pattern/i,
});
});

Expand Down

0 comments on commit 78ec9ac

Please sign in to comment.