From 1d5d1fd44a5ecf9a7f9979679f3f29b7cb6ba2d4 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 12 Feb 2021 10:37:06 +0000 Subject: [PATCH] sources/ostree: support format version 2 In format version 2, the source specific keys for the sources, here "urls", is replaced by a generic `items` key, common to all sources. Express that in the schema. --- sources/org.osbuild.ostree | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sources/org.osbuild.ostree b/sources/org.osbuild.ostree index 0305d5e7..a73a069c 100755 --- a/sources/org.osbuild.ostree +++ b/sources/org.osbuild.ostree @@ -16,8 +16,8 @@ import uuid SCHEMA = """ "additionalProperties": false, -"properties": { - "commits": { +"definitions": { + "item": { "description": "The commits to fetch indexed their checksum", "type": "object", "additionalProperties": false, @@ -49,7 +49,16 @@ SCHEMA = """ } } } -} +}, +"properties": { + "items": {"$ref": "#/definitions/item"}, + "commits": {"$ref": "#/definitions/item"} +}, +"oneOf": [{ + "required": ["items"] +}, { + "required": ["commits"] +}] """