On 08/07/2022 22:12, Sean Anderson wrote: > 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 You miss here maxItems, which is not correct (no upper limit). This is why array type is expected. Best regards, Krzysztof