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.
This commit is contained in:
Christian Kellner 2021-02-12 10:37:06 +00:00
parent a065df5654
commit 1d5d1fd44a

View file

@ -16,8 +16,8 @@ import uuid
SCHEMA = """ SCHEMA = """
"additionalProperties": false, "additionalProperties": false,
"properties": { "definitions": {
"commits": { "item": {
"description": "The commits to fetch indexed their checksum", "description": "The commits to fetch indexed their checksum",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
@ -49,7 +49,16 @@ SCHEMA = """
} }
} }
} }
} },
"properties": {
"items": {"$ref": "#/definitions/item"},
"commits": {"$ref": "#/definitions/item"}
},
"oneOf": [{
"required": ["items"]
}, {
"required": ["commits"]
}]
""" """