From dca0a655976ca6414d98214564369a781db82094 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 29 Mar 2022 15:57:04 +0200 Subject: [PATCH] Add source/dist keys to root schema, fixes #10655 --- res/composer-schema.json | 82 +++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/res/composer-schema.json b/res/composer-schema.json index f636fc9f5..1d99030ff 100644 --- a/res/composer-schema.json +++ b/res/composer-schema.json @@ -132,6 +132,12 @@ } } }, + "source": { + "$ref": "#/definitions/source" + }, + "dist": { + "$ref": "#/definitions/dist" + }, "_comment": { "type": ["array", "string"], "description": "A key to store comments in" @@ -953,46 +959,52 @@ } }, "source": { - "type": "object", - "required": ["type", "url", "reference"], - "properties": { - "type": { - "type": "string" - }, - "url": { - "type": "string" - }, - "reference": { - "type": "string" - }, - "mirrors": { - "type": "array" - } - } + "$ref": "#/definitions/source" }, "dist": { - "type": "object", - "required": ["type", "url"], - "properties": { - "type": { - "type": "string" - }, - "url": { - "type": "string" - }, - "reference": { - "type": "string" - }, - "shasum": { - "type": "string" - }, - "mirrors": { - "type": "array" - } - } + "$ref": "#/definitions/dist" } }, "additionalProperties": true + }, + "source": { + "type": "object", + "required": ["type", "url", "reference"], + "properties": { + "type": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "mirrors": { + "type": "array" + } + } + }, + "dist": { + "type": "object", + "required": ["type", "url"], + "properties": { + "type": { + "type": "string" + }, + "url": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "shasum": { + "type": "string" + }, + "mirrors": { + "type": "array" + } + } } } }