[PATCH v4 3/9] bitbake-setup.schema.json: Use anyOf for non-disjoint subschemas
Rob Woolley <[email protected]> Fri, 19 Jun 2026 10:39:29 -0700
| Newsgroups | org.openembedded.lists.bitbake-devel |
|---|---|
| Message-ID | <[email protected]> |
The oneOf keyword is for matching only one subschema. It is intended to fail validation if the JSON instance validates against more than 1 or zero subschemas. In this case the possible BitBake configuration fragments are disjoint and anyOf may be used instead. This resolves the following jsonschema linting error: A `oneOf` where all branches have disjoint types can be safely converted to `anyOf` (oneof_to_anyof_disjoint_types) Reviewed-by: Yoann Congal <[email protected]> Signed-off-by: Rob Woolley <[email protected]> --- setup-schema/bitbake-setup.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup-schema/bitbake-setup.schema.json b/setup-schema/bitbake-setup.schema.json index 1830d16df..056ace37a 100644 --- a/setup-schema/bitbake-setup.schema.json +++ b/setup-schema/bitbake-setup.schema.json @@ -76,7 +76,7 @@ "description": "Human-readable description of the configuration" }, "notes": { - "oneOf": [ + "anyOf": [ { "type": "string" }, @@ -112,7 +112,7 @@ "type": "array", "description": "List of BitBake configuration fragments to enable", "items": { - "oneOf": [ + "anyOf": [ { "type": "string", "description": "Configuration fragment name" -- 2.49.0