Thread (31 messages) 31 messages, 6 authors, 2023-01-20

Re: [PATCH net-next v3 2/8] netlink: add schemas for YAML specs

From: Rob Herring <robh@kernel.org>
Date: 2023-01-20 14:44:59
Also in: linux-doc

On Thu, Jan 19, 2023 at 6:08 PM Jakub Kicinski [off-list ref] wrote:
On Thu, 19 Jan 2023 08:07:31 -0600 Rob Herring wrote:
quoted
quoted
+$id: "http://kernel.org/schemas/netlink/genetlink-c.yaml#"
+$schema: "http://kernel.org/meta-schemas/netlink/core.yaml#"
There's no core.yaml. If you don't have a custom meta-schema, then
just set this to the schema for the json-schema version you are using.
Then the tools can validate the schemas without your own validator
class.
$schema: https://json-schema.org/draft/2020-12/schema

or

$schema: https://json-schema.org/draft-09/schema
s/draft-09/draft\/2019-09/

Or did you mean draft-07?
?

It seems like the documentation suggests the former but the latter
appears widespread.
Yes, 2019-09 is generally not recommended as it had some one off
features that 2020-12 replaced (nothing you'd care about). DT uses
2019-09 because we needed unevaluatedProperties, but not 'prefixItems'
replacing 'items' list variant in 2020-12. I think you only used the
schema version of 'items' (not the list version), so you are probably
compatible with any version. 'dependencies' changing to
'dependentSchema/dependentRequired' is the other difference you might
hit.

TLDR: draft-07 is probably sufficient for your needs.

Rob
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help