[PATCH] meta-schemas: nodes: Allow if-then-else directly in patternProperties objects

John Ernberg <[email protected]> Mon, 9 Jun 2025 09:59:51 +0000
Newsgroups org.kernel.vger.devicetree-spec
Message-ID <[email protected]>
Having local singular if-then-else statements under a patternProperties
object-node causes a schema warning about an unexpected statement.

Allow this construct to reduce size of singular if-then-else blocks in
this context, aligning the rules of them with the top-level.

Signed-off-by: John Ernberg <[email protected]>
---
 dtschema/meta-schemas/nodes.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dtschema/meta-schemas/nodes.yaml b/dtschema/meta-schemas/nodes.yaml
index 0b2c8f7..e45cb45 100644
--- a/dtschema/meta-schemas/nodes.yaml
+++ b/dtschema/meta-schemas/nodes.yaml
@@ -27,6 +27,9 @@ propertyNames:
     - deprecated
     - required
     - not
+    - if
+    - else
+    - then
     - allOf
     - anyOf
     - oneOf
-- 
2.49.0