From b4ba1e70c2c0e8b983261d39b9ebbc441ecf1935 Mon Sep 17 00:00:00 2001 From: DasSkelett Date: Sun, 12 Jul 2020 12:28:17 +0200 Subject: [PATCH] Add author to list of required properties in CKAN.schema --- CKAN.schema | 1 + Spec.md | 30 +++++++++---------- Tests/NetKAN/Validators/CkanValidatorTests.cs | 1 + .../ObeysCKANSchemaValidatorTests.cs | 2 ++ 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/CKAN.schema b/CKAN.schema index 7c607cc555..20d65738b9 100644 --- a/CKAN.schema +++ b/CKAN.schema @@ -319,6 +319,7 @@ "required" : [ "spec_version", "name", + "author", "abstract", "identifier", "license", diff --git a/Spec.md b/Spec.md index 861b1a6b35..f38a296ff4 100644 --- a/Spec.md +++ b/Spec.md @@ -133,16 +133,6 @@ are marked with **v1.2** through to **v1.26** respectively. For maximum compatibility, using older spec versions is preferred when newer features are not required. -##### name - -This is the human readable name of the mod, and may contain any -printable characters. Eg: "Ferram AĆ«rospace Research (FAR)", -"Real Solar System". - -##### abstract - -A short, one line description of the mod and what it does. - ##### identifier This is the globally unique identifier for the mod, and is how the mod @@ -159,6 +149,21 @@ this means the identifier *should* be the name of the directory in `GameData` in which the mod would be installed, or the name of the `.dll` with any version and the `.dll` suffix removed. +##### name + +This is the human readable name of the mod, and may contain any +printable characters. Eg: "Ferram AĆ«rospace Research (FAR)", +"Real Solar System". + +##### abstract + +A short, one line description of the mod and what it does. + +##### author + +The author, or list of authors, for this mod. No restrictions are +placed upon this field. + ##### download A fully formed URL, indicating where a machine may download the @@ -340,11 +345,6 @@ A comment field, if included, is ignored. It is not displayed to users, nor used by programs. Its primary use is to convey information to humans examining the CKAN file manually -##### author - -The author, or list of authors, for this mod. No restrictions are -placed upon this field. - ##### description A free form, long text description of the mod, suitable for displaying detailed information about the mod. diff --git a/Tests/NetKAN/Validators/CkanValidatorTests.cs b/Tests/NetKAN/Validators/CkanValidatorTests.cs index 1cd10a6f8b..3566227028 100644 --- a/Tests/NetKAN/Validators/CkanValidatorTests.cs +++ b/Tests/NetKAN/Validators/CkanValidatorTests.cs @@ -20,6 +20,7 @@ public void SetUp() ValidCkan["identifier"] = "AwesomeMod"; ValidCkan["name"] = "Awesome Mod"; ValidCkan["abstract"] = "A great mod"; + ValidCkan["author"] = "Phenomenal Author"; ValidCkan["license"] = "GPL-3.0"; ValidCkan["version"] = "1.0.0"; ValidCkan["download"] = "https://www.awesome-mod.example/AwesomeMod.zip"; diff --git a/Tests/NetKAN/Validators/ObeysCKANSchemaValidatorTests.cs b/Tests/NetKAN/Validators/ObeysCKANSchemaValidatorTests.cs index be90cb2e51..23580a009d 100644 --- a/Tests/NetKAN/Validators/ObeysCKANSchemaValidatorTests.cs +++ b/Tests/NetKAN/Validators/ObeysCKANSchemaValidatorTests.cs @@ -20,6 +20,7 @@ public void Validate_Obeys_DoesNotThrow(string json) TestCase(boringModule, "spec_version"), TestCase(boringModule, "identifier"), TestCase(boringModule, "name"), + TestCase(boringModule, "author"), TestCase(boringModule, "version"), TestCase(boringModule, "license"), TestCase(boringModule, "download"), @@ -74,6 +75,7 @@ private void TryModule(string json, string removeProperty = null, string addProp ""identifier"": ""BoringModule"", ""name"": ""Boring Module"", ""abstract"": ""A minimal module that obeys CKAN.schema"", + ""author"": ""Boring Author"", ""version"": ""1.0.0"", ""license"": ""MIT"", ""download"": ""https://mysite.org/mymod.zip""