@tillhub/schemas 6.403.0 → 6.404.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [6.404.0](https://github.com/tillhub/schemas/compare/v6.403.0...v6.404.0) (2025-10-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **UNTIL-15266:** refine schema to restrict section keys and enhance validation ([#1086](https://github.com/tillhub/schemas/issues/1086)) ([024e15a](https://github.com/tillhub/schemas/commit/024e15a))
|
|
7
|
+
|
|
1
8
|
# [6.403.0](https://github.com/tillhub/schemas/compare/v6.402.0...v6.403.0) (2025-10-09)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
const
|
|
1
|
+
const base = require('./base')
|
|
2
|
+
|
|
3
|
+
// Allow only section keys similar to create, excluding meta fields
|
|
4
|
+
const disallowedKeys = new Set(['name', 'client_id', 'owner', 'level', 'created_at', 'updated_at'])
|
|
5
|
+
const allowedSectionKeys = Object.keys(base).filter((k) => !disallowedKeys.has(k))
|
|
2
6
|
|
|
3
7
|
module.exports = {
|
|
4
8
|
$id: 'https://schemas.tillhub.com/v1/configurations.bulk_update.request.schema.json',
|
|
@@ -12,11 +16,15 @@ module.exports = {
|
|
|
12
16
|
minItems: 1,
|
|
13
17
|
items: {
|
|
14
18
|
type: 'object',
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
// Accept only known section keys (from base) besides id/owner; each section value must be an object
|
|
20
|
+
additionalProperties: { type: 'object' },
|
|
21
|
+
propertyNames: {
|
|
22
|
+
enum: ['id', 'owner', ...allowedSectionKeys]
|
|
23
|
+
},
|
|
24
|
+
required: ['id'],
|
|
17
25
|
properties: {
|
|
18
|
-
id: { type: 'string' },
|
|
19
|
-
|
|
26
|
+
id: { type: 'string', format: 'uuid' },
|
|
27
|
+
owner: { type: 'string', format: 'uuid' }
|
|
20
28
|
}
|
|
21
29
|
}
|
|
22
30
|
}
|