Debian Codegraph @

dtschema/meta-schemas/cell.yaml

raw
1 # SPDX-License-Identifier: BSD-2-Clause
2 # Copyright 2018 Linaro Ltd.
3 # Copyright 2018 Arm Ltd.
4 %YAML 1.2
5 ---
6 $id: http://devicetree.org/meta-schemas/cell.yaml#
7 $schema: https://json-schema.org/draft/2019-09/schema
8
9 array:
10 description: cell array properties must define how many entries and what the
11 entries are when there is more than one entry.
12 anyOf:
13 - description: 'Only "maxItems" is required for a single entry if there are
14 no constraints defined for the values.'
15 properties:
16 maxItems:
17 const: 1
18 required: [maxItems]
19 propertyNames:
20 enum: [maxItems, description, deprecated]
21 - description:
22 Arrays must be described with a combination of minItems/maxItems/items
23 properties:
24 minItems:
25 minimum: 1
26 maxItems:
27 minimum: 2
28 oneOf:
29 type: array
30 items:
31 $ref: '#/array'
32 anyOf:
33 type: array
34 items:
35 $ref: '#/array'
36 items:
37 description: '"items" can be a list defining each entry or a schema
38 applying to all items. A list has an implicit size. A schema
39 requires minItems/maxItems to define the size.'
40 if:
41 type: object
42 then:
43 $ref: '#/array'
44 else:
45 type: array
46 if:
47 items:
48 required: [ items ]
49 then:
50 maxItems: 1 # for more than 1, outer 'items' should be a schema
51 items:
52 $ref: '#/array'
53 else:
54 items:
55 $ref: '#/single'
56 additionalItems:
57 type: boolean
58 const: true
59 description: true
60 deprecated: true
61
62 additionalProperties: false
63
64 - $ref: '#/single'
65
66 single:
67 description: A singular entry should be described with scalar constraints
68 properties:
69 description: true
70 const:
71 type: integer
72 enum:
73 items:
74 type: integer
75 minimum: {}
76 maximum: {}
77 default:
78 type: integer
79 oneOf:
80 items:
81 $ref: '#/single'
82
83 propertyNames:
84 enum: [ description, deprecated, const, enum, minimum, maximum, multipleOf, default, $ref, oneOf ]