From 696f2e2e22f78e722b768d9e5eb2182befcfcb5e Mon Sep 17 00:00:00 2001 From: Richard Kuhnt Date: Sat, 3 Nov 2018 20:43:23 +0100 Subject: [PATCH] schema.json: Add example SPDX license identifiers to schema --- schema.json | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/schema.json b/schema.json index a2fa73bc2..efbb3def3 100644 --- a/schema.json +++ b/schema.json @@ -348,6 +348,32 @@ "uniqueItems": true } ] + }, + "licenseIdentifiers": { + "type": "string", + "description": "License identifier based on SPDX License List https://spdx.org/licenses/", + "examples": [ + "Apache-2.0", + "BSD-3-Clause", + "Freeware", + "GPL-2.0-only", + "GPL-2.0-or-later", + "GPL-3.0-only", + "GPL-3.0-or-later", + "ISC", + "LGPL-2.0-only", + "LGPL-2.0-or-later", + "LGPL-2.1-only", + "LGPL-2.1-or-later", + "LGPL-3.0-only", + "LGPL-3.0-or-later", + "MIT", + "MS-PL", + "Proprietary", + "Public Domain", + "Shareware", + "Unlicense" + ] } }, "properties": { @@ -423,7 +449,7 @@ "license": { "anyOf": [ { - "type": "string" + "$ref": "#/definitions/licenseIdentifiers" }, { "additionalProperties": false, @@ -433,7 +459,7 @@ "type": "string" }, "identifier": { - "type": "string" + "$ref": "#/definitions/licenseIdentifiers" } }, "required": [