From 15d58dac1975a5429f9d1223676dddc1026b2a75 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 9 Feb 2022 16:53:20 +0100 Subject: make resource dependency specifier an object --- common_definitions-1.schema.json | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'common_definitions-1.schema.json') diff --git a/common_definitions-1.schema.json b/common_definitions-1.schema.json index 0deca24..b8149a8 100644 --- a/common_definitions-1.schema.json +++ b/common_definitions-1.schema.json @@ -80,6 +80,16 @@ "type": "string", "pattern": "^[-0-9a-z]+$" }, + "item_dep_specifier": { + "description": "Simple reference to an item as a dependency", + "type": "object", + "required": ["identifier"], + "properties": { + "identifier": { + "$ref": "#/definitions/item_identifier" + } + } + }, "item_ref": { "description": "An object containing a subset of fields from full item definition", "type": "object", @@ -156,6 +166,14 @@ "description": "What scripts are included in the resource", "$ref": "#/definitions/file_ref_list", "default": [] + }, + "dependencies": { + "description": "Which other resources this resource depends on", + "type": "array", + "items": { + "$ref": "#/definitions/item_dep_specifier" + }, + "default": [] } } }] @@ -175,14 +193,7 @@ "payloads": { "description": "Which payloads are to be applied to which URLs", "additionalProperties": { - "description": "Which payload applies to URLs matching given pattern", - "type": "object", - "required": ["identifier"], - "properties": { - "identifier": { - "$ref": "#/definitions/item_identifier" - } - } + "$ref": "#/definitions/item_dep_specifier" }, "default": {}, "examples": [{ -- cgit v1.2.3