* [PATCH] meta-schemas: Allow 'not' keyword
@ 2023-03-23 15:09 Serge Semin
[not found] ` <20230323150947.947-1-Sergey.Semin-UN2wsyeM1qLJ45LvJ/SUn8gurn75+9Lz@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Serge Semin @ 2023-03-23 15:09 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski
Cc: Serge Semin, Serge Semin, Alexey Malahov, Pavel Parkhomenko,
Rob Herring, Krzysztof Kozlowski,
devicetree-spec-u79uwXL29TY76Z2rM5mHXA
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.
Signed-off-by: Serge Semin <Sergey.Semin-UN2wsyeM1qLJ45LvJ/SUn8gurn75+9Lz@public.gmane.org>
---
Please see the next email message for the patch context:
Link: https://lore.kernel.org/netdev/20230313225103.30512-16-Sergey.Semin-UN2wsyeM1qLJ45LvJ/SUn8gurn75+9Lz@public.gmane.org
---
dtschema/meta-schemas/base.yaml | 2 +-
dtschema/meta-schemas/nodes.yaml | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dtschema/meta-schemas/base.yaml b/dtschema/meta-schemas/base.yaml
index 1dd005c53467..96d0a82febc6 100644
--- a/dtschema/meta-schemas/base.yaml
+++ b/dtschema/meta-schemas/base.yaml
@@ -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:
diff --git a/dtschema/meta-schemas/nodes.yaml b/dtschema/meta-schemas/nodes.yaml
index 7568169a7907..0b2c8f750624 100644
--- a/dtschema/meta-schemas/nodes.yaml
+++ b/dtschema/meta-schemas/nodes.yaml
@@ -26,6 +26,7 @@ propertyNames:
- unevaluatedProperties
- deprecated
- required
+ - not
- allOf
- anyOf
- oneOf
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] meta-schemas: Allow 'not' keyword
[not found] ` <20230323150947.947-1-Sergey.Semin-UN2wsyeM1qLJ45LvJ/SUn8gurn75+9Lz@public.gmane.org>
@ 2023-03-23 16:13 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2023-03-23 16:13 UTC (permalink / raw)
To: Serge Semin
Cc: Krzysztof Kozlowski, Serge Semin, Alexey Malahov,
Pavel Parkhomenko, Krzysztof Kozlowski,
devicetree-spec-u79uwXL29TY76Z2rM5mHXA
On Thu, Mar 23, 2023 at 10:12 AM Serge Semin
<Sergey.Semin-UN2wsyeM1qLJ45LvJ/SUn8gurn75+9Lz@public.gmane.org> wrote:
>
> 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.
>
> Signed-off-by: Serge Semin <Sergey.Semin-UN2wsyeM1qLJ45LvJ/SUn8gurn75+9Lz@public.gmane.org>
>
> ---
>
> Please see the next email message for the patch context:
> Link: https://lore.kernel.org/netdev/20230313225103.30512-16-Sergey.Semin@baikalelectronics.ru
> ---
> dtschema/meta-schemas/base.yaml | 2 +-
> dtschema/meta-schemas/nodes.yaml | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-23 16:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 15:09 [PATCH] meta-schemas: Allow 'not' keyword Serge Semin
[not found] ` <20230323150947.947-1-Sergey.Semin-UN2wsyeM1qLJ45LvJ/SUn8gurn75+9Lz@public.gmane.org>
2023-03-23 16:13 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).