meta-schemas: cell: Allow 'default' and 'uniqueItems' for common unit… #178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… arrays
Properties with common unit suffixes are type of 'cell.yaml#/array' which lists allowed property names. 'default' and 'uniqueItems' are not there, thus property like:
fiti,tdly-ms:
description: example
maxItems: 4
items:
enum: [0, 1, 2, 4]
default: [0, 0, 0, 0]
was failing with:
properties:fiti,tdly-ms: 'anyOf' conditional failed, one must be fixed:
'items' is not one of ['maxItems', 'description', 'deprecated']
hint: Only "maxItems" is required for a single entry if there are no constraints defined for the values.
'default' is not one of ['maxItems', 'description', 'deprecated']
hint: Only "maxItems" is required for a single entry if there are no constraints defined for the values.
Additional properties are not allowed ('default' was unexpected)
hint: Arrays must be described with a combination of minItems/maxItems/items
'maxItems' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'multipleOf', 'default', '$ref', 'oneOf']
'items' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'multipleOf', 'default', '$ref', 'oneOf']
[0, 0, 0, 0] is not of type 'integer'
1 was expected
hint: Only "maxItems" is required for a single entry if there are no constraints defined for the values.
hint: cell array properties must define how many entries and what the entries are when there is more than one entry.
from schema $id: http://devicetree.org/meta-schemas/cell.yaml
Add a simple test-case for that which can be used with:
dt-doc-validate -u test/schemas test/schemas/property-units-example.yaml