Skip to contentSkip to conversation

meta-schemas: Allow 'not' keyword

PATCH Applied Serge Semin 2 participants 2 messages Mar 23, 2023 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meta-schemas: Allow 'not' keyword

Root- and sub-node schemas are supposed to be allowed to use the 'not' keyword directly to express a schema against which the instance isn't supposed to be successfully validated. It shall work in the same way as the allOf, anyOf, oneOf-based validation except the keyword implies a single sub-schema against which an instance will be anti-evaluated.

---

Please see the next email message for the patch context:

---
 dtschema/meta-schemas/base.yaml  | 2 +-
 dtschema/meta-schemas/nodes.yaml | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
dtschema/meta-schemas/base.yaml +1 -1
index 1dd005c53467..96d0a82febc6 100644
@@ -50,7 +50,7 @@ properties:
 propertyNames:
   enum: [ $id, $schema, title, description, examples, required, allOf, anyOf, oneOf,
           definitions, $defs, additionalProperties, dependencies, dependentRequired,
-          dependentSchemas, patternProperties, properties, if, then, else,
+          dependentSchemas, patternProperties, properties, not, if, then, else,
           unevaluatedProperties, deprecated, maintainers, select, $ref ]
 
 required:
dtschema/meta-schemas/nodes.yaml +1 -0
index 7568169a7907..0b2c8f750624 100644
@@ -26,6 +26,7 @@ propertyNames:
     - unevaluatedProperties
     - deprecated
     - required
+    - not
     - allOf
     - anyOf
     - oneOf
Signature · 1 line
2.39.2

A message that is not in the archive (sent off-list or not yet received): 20230323150947.947-1-Sergey.Semin-UN2wsyeM1qLJ45LvJ/[email protected]

Applied
#2 lore raw
Quoted 9 lines · On Thu, Mar 23, 2023 at 10:12 AM Serge Semin…

Root- and sub-node schemas are supposed to be allowed to use the 'not' keyword directly to express a schema against which the instance isn't supposed to be successfully validated. It shall work in the same way as the allOf, anyOf, oneOf-based validation except the keyword implies a single sub-schema against which an instance will be anti-evaluated.

Quoted 8 lines

---

Please see the next email message for the patch context:

---
 dtschema/meta-schemas/base.yaml  | 2 +-
 dtschema/meta-schemas/nodes.yaml | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.