dt-schema non-array items property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm a bit confused about how the items property is supposed to work.
According to meta-schemas/string-array.yaml, the contents of items may
be either a list of enum, const, or pattern, or an object with any
properties allowed at the top level. However, this last clause doesn't
seem to apply. If I try to use it, such as in
should-work-but-doesnt-names below, I get

test.yaml: properties:should-work-but-doesnt-names:items: {'enum': ['a', 'b', 'c']} is not of type 'array'
	from schema $id: http://devicetree.org/meta-schemas/string-array.yaml#

What's going on here?

--Sean

%YAML 1.2
---
$id: http://devicetree.org/schemas/test.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ""
maintainers: []
unevaluatedProperties: false

properties:
  compatible:
    const: baz

  verbose-names:
    $ref: "/schemas/types.yaml#/definitions/string-array"
    minItems: 1
    items:
      - enum: [a, b, c]
      - enum: [a, b, c]
      - enum: [a, b, c]
 
  non-kosher-names:
    $ref: "/schemas/types.yaml#/definitions/string-array"
    minItems: 1
    items:
      - enum: &abc [a, b, c]
      - enum: *abc
      - enum: *abc

  should-work-but-doesnt-names:
    $ref: "/schemas/types.yaml#/definitions/string-array"
    minItems: 1
    items:
      enum: [a, b, c]

examples:
  - |
    baz {
      compatible = "baz";
      verbose-names = "c", "b", "a";
      non-kosher-names = "c", "b", "a";
      should-work-but-doesnt-names = "c", "b", "a";
    };
...



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux