lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230119142445.78e72105@kernel.org>
Date:   Thu, 19 Jan 2023 14:24:45 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Rob Herring <robh@...nel.org>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
        pabeni@...hat.com, johannes@...solutions.net,
        stephen@...workplumber.org, ecree.xilinx@...il.com, sdf@...gle.com,
        f.fainelli@...il.com, fw@...len.de, linux-doc@...r.kernel.org,
        razor@...ckwall.org, nicolas.dichtel@...nd.com
Subject: Re: [PATCH net-next v3 2/8] netlink: add schemas for YAML specs

On Thu, 19 Jan 2023 13:49:22 -0800 Jakub Kicinski wrote:
> > Generally you put common schemas under '$defs' and the then reference
> > them with '$ref'.
> > 
> > $defs:
> >   some-prop-type:
> >     type: integer
> >     minimum: 0
> > 
> > properties:
> >   foo:
> >     $ref: '#/$defs/some-prop-type'
> >   bar:
> >     $ref: '#/$defs/some-prop-type'  
> 
> Thanks! Is it possible to move the common definitions to a separate
> file? I tried to create a file called defs.yaml and change the ref to:
> 
>   $ref: "defs.yaml#/$defs/len-or-define"

Oh, oh. Instead of trying to create 3 different "levels" of spec,
and having to pull out shared definitions maybe I can use the 
  if + unevaluatedProperties
to only allow certain properties depending on the value in the
"protocol" attribute...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ