Debian Codegraph @

dtschema/meta-schemas/types.yaml

raw
1 # SPDX-License-Identifier: BSD-2-Clause
2 # Copyright 2023 Arm Ltd.
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/meta-schemas/types.yaml#
6 $schema: https://json-schema.org/draft/2019-09/schema
7
8 description: Checks for schemas with a defined type
9
10 allOf:
11 - if:
12 properties:
13 $ref:
14 pattern: 'u?int(8|16|32|64)$'
15 required:
16 - $ref
17 then:
18 description: An integer type must have integer constraints
19 properties:
20 const:
21 type: integer
22 enum:
23 items:
24 type: integer
25 - if:
26 properties:
27 $ref:
28 pattern: 'string$'
29 required:
30 - $ref
31 then:
32 description: A string type must have string constraints
33 properties:
34 const:
35 type: string
36 enum:
37 items:
38 type: string
39