From: Jakub Kicinski <kuba@kernel.org>
To: Donald Hunter <donald.hunter@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Jiri Pirko <jiri@resnulli.us>,
Stanislav Fomichev <sdf@google.com>,
donald.hunter@redhat.com
Subject: Re: [PATCH net-next v2 5/5] doc/netlink/specs: Add spec for nlctrl netlink family
Date: Wed, 6 Mar 2024 16:04:58 -0800 [thread overview]
Message-ID: <20240306160458.3605e8aa@kernel.org> (raw)
In-Reply-To: <CAD4GDZwtD7v_zQzeGDu93sropHbRsRANUMJ-MAB1w+CZCMyXuQ@mail.gmail.com>
On Wed, 6 Mar 2024 22:54:08 +0000 Donald Hunter wrote:
> > I've used
> > enum-name:
> > i.e. empty value in other places.
> > Is using empty string more idiomatic?
>
> I got this when I tried to use an empty value, so I used '' everywhere instead.
>
> jsonschema.exceptions.ValidationError: None is not of type 'string'
>
> Failed validating 'type' in
> schema['properties']['attribute-sets']['items']['properties']['enum-name']:
> {'description': 'Name for the enum type of the attribute.',
> 'type': 'string'}
>
> On instance['attribute-sets'][1]['enum-name']:
> None
>
> It turns out that the fix for that is a schema change:
>
> --- a/Documentation/netlink/genetlink-legacy.yaml
> +++ b/Documentation/netlink/genetlink-legacy.yaml
> @@ -169,7 +169,7 @@ properties:
> type: string
> enum-name:
> description: Name for the enum type of the attribute.
> - type: string
> + type: [ string, "null" ]
> doc:
> description: Documentation of the space.
> type: string
>
> I'll respin with a cleaned up nlctrl spec and fixes for the schemas.
Hm, is this some new version of jsonschema perhaps?
We use empty values all over the place:
$ git grep 'enum-name:$' -- Documentation/netlink/specs/
Documentation/netlink/specs/ethtool.yaml: enum-name:
Documentation/netlink/specs/fou.yaml: enum-name:
Documentation/netlink/specs/ovs_datapath.yaml: enum-name:
Documentation/netlink/specs/ovs_flow.yaml: enum-name:
Documentation/netlink/specs/ovs_flow.yaml: enum-name:
next prev parent reply other threads:[~2024-03-07 0:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 12:56 [PATCH net-next v2 0/5] tools/net/ynl: Add support for nlctrl netlink family Donald Hunter
2024-03-06 12:57 ` [PATCH net-next v2 1/5] tools/net/ynl: Fix extack decoding for netlink-raw Donald Hunter
2024-03-06 16:33 ` Jakub Kicinski
2024-03-06 12:57 ` [PATCH net-next v2 2/5] tools/net/ynl: Report netlink errors without stacktrace Donald Hunter
2024-03-06 16:33 ` Jakub Kicinski
2024-03-06 12:57 ` [PATCH net-next v2 3/5] tools/net/ynl: Fix c codegen for array-nest Donald Hunter
2024-03-06 18:03 ` Jakub Kicinski
2024-03-06 12:57 ` [PATCH net-next v2 4/5] tools/net/ynl: Add nest-type-value decoding Donald Hunter
2024-03-06 18:07 ` Jakub Kicinski
2024-03-06 12:57 ` [PATCH net-next v2 5/5] doc/netlink/specs: Add spec for nlctrl netlink family Donald Hunter
2024-03-06 18:31 ` Jakub Kicinski
2024-03-06 22:54 ` Donald Hunter
2024-03-07 0:04 ` Jakub Kicinski [this message]
2024-03-07 8:58 ` Donald Hunter
2024-03-06 18:32 ` [PATCH net-next v2 0/5] tools/net/ynl: Add support " Jakub Kicinski
2024-03-06 22:14 ` Donald Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240306160458.3605e8aa@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=donald.hunter@redhat.com \
--cc=edumazet@google.com \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).