Skip to contentSkip to conversation

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

PATCH Applied John Ernberg 2 participants 2 messages Jun 9, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meta-schemas: nodes: Allow if-then-else directly in patternProperties objects

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.

---
 dtschema/meta-schemas/nodes.yaml | 3 +++
 1 file changed, 3 insertions(+)
dtschema/meta-schemas/nodes.yaml +3 -0
index 0b2c8f7..e45cb45 100644
@@ -27,6 +27,9 @@ propertyNames:
     - deprecated
     - required
     - not
+    - if
+    - else
+    - then
     - allOf
     - anyOf
     - oneOf
Signature · 1 line
2.49.0
Applied
#1 lore raw
Quoted 10 lines · John Ernberg

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.

---
 dtschema/meta-schemas/nodes.yaml | 3 +++
 1 file changed, 3 insertions(+)

Applied, thanks.

Rob