From 7d7bafe8b268cd675bd7c23bf6dd00c20d20ba83 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 30 Apr 2020 12:13:28 -0500 Subject: [PATCH] meta-schemas: Ensure json-schema vocab aren't DT property names It's very easy to define json-schema vocabulary as DT properties by mistake if the indentation is wrong. There's unlikely to be much overlap. 'type' is one such case though. Signed-off-by: Rob Herring --- meta-schemas/core.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta-schemas/core.yaml b/meta-schemas/core.yaml index a729d3d0..e623fda0 100644 --- a/meta-schemas/core.yaml +++ b/meta-schemas/core.yaml @@ -30,6 +30,15 @@ definitions: $ref: "string-array.yaml" memory-region: $ref: "cell.yaml#array" + propertyNames: + # Ensure DT property names are not json-schema vocabulary names + not: + enum: [ $ref, additionalItems, additionalProperties, allOf, anyOf, + const, contains, default, dependencies, deprecated, description, + else, enum, if, items, maxItems, maximum, minItems, minimum, + multipleOf, not, oneOf, pattern, patternProperties, properties, + propertyNames, required, then, unevaluatedProperties ] + patternProperties: '.*-names$': $ref: "string-array.yaml"