Re: [PATCH RFC 01/20] ctlv: Add the schema language and generator

From: Jiri Pirko

Date: Tue Oct 27 2026 - 04:35:10 EST


Wed, Oct 21, 2026 at 12:31:32AM +0200, jic23@xxxxxxxxxx wrote:
>On Thu, 15 Oct 2026 16:50:34 +0200
>Jiri Pirko <jiri@xxxxxxxxxxx> wrote:
>

[..]

>> + A named attr set, a whole attr group, or one exact attr as
>> + "group.attr". There are no tuple selectors and no cross-family
>> + qualification.
>> + type: string
>> + pattern: ^[a-z0-9]+(-[a-z0-9]+)*(\.[a-z0-9]+(-[a-z0-9]+)*)?$
>> +
>> + selectors:
>> + oneOf:
>> + - $ref: '#/$defs/selector'
>> + - type: array
>> + minItems: 1
>> + items:
>> + $ref: '#/$defs/selector'
>
>My yaml is terrible (and all learnt form reviewing DT bindings which are
>undoubtedly perfect :) but random LLM agrees with me that you can simplify
>this as it's a local definition. I think doing so makes life a little
>easier for reader by indicating it is thing defined a few lines up.
>
> $ref: 'selector'
>
>I don't care that much though.

Tried it: $ref is resolved as a URI against the schema's $id, so
'selector' doesn't resolve. '#/$defs/selector' is the shortest form that
works without an extra $id line in every definition, and it is what DT
bindings use, so I'm keeping it.


[..]