From 589b4b5adf2da6d4de9520cbfcdd9d81ff16f144 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 7 Mar 2024 23:25:42 +0100 Subject: [PATCH] add the schema link in toml files create & add a schema to graveyard.tom tag kavita with "paid-content" aaaaa the autoformater tag kavita with "paid-content" aaaaa the autoformater add the schema link in toml files create & add a schema to antifeatures.toml add 'draft' property to the wishlist schema --- antifeatures.toml | 2 + apps.toml | 2 + categories.toml | 2 + graveyard.toml | 2 + schemas/antifeatures.toml.schema.json | 63 +++++++++++++++++++++++++++ schemas/graveyard.toml.schema.json | 48 ++++++++++++++++++++ schemas/wishlist.toml.schema.json | 13 ++++-- wishlist.toml | 2 + 8 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 schemas/antifeatures.toml.schema.json create mode 100644 schemas/graveyard.toml.schema.json diff --git a/antifeatures.toml b/antifeatures.toml index fa9f300b..ab17ee8e 100644 --- a/antifeatures.toml +++ b/antifeatures.toml @@ -1,3 +1,5 @@ +#:schema https://github.com/YunoHost/apps/blob/master/schemas/antifeatures.toml.schema.json + [tracking] icon = "user-secret" title.en = "Tracking" diff --git a/apps.toml b/apps.toml index 05b8df5c..f3d5b9f6 100644 --- a/apps.toml +++ b/apps.toml @@ -1,3 +1,5 @@ +#:schema https://github.com/YunoHost/apps/raw/master/schemas/apps.toml.schema.json + [13ft] category = "reading" level = 7 diff --git a/categories.toml b/categories.toml index de1779de..07977128 100644 --- a/categories.toml +++ b/categories.toml @@ -1,3 +1,5 @@ +#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/categories.toml.schema.json + [synchronization] icon = "cloud" title.en = "Synchronization" diff --git a/graveyard.toml b/graveyard.toml index f4b43d73..c875af66 100644 --- a/graveyard.toml +++ b/graveyard.toml @@ -1,3 +1,5 @@ +#:schema https://github.com/YunoHost/apps/raw/master/schemas/graveyard.toml.schema.json + [anfora] category = "social_media" subtags = [ "pictures" ] diff --git a/schemas/antifeatures.toml.schema.json b/schemas/antifeatures.toml.schema.json new file mode 100644 index 00000000..880285db --- /dev/null +++ b/schemas/antifeatures.toml.schema.json @@ -0,0 +1,63 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://github.com/YunoHost/apps/blob/master/schemas/antifeatures.toml.schema.json", + "title": "Yunohost's antifeatures.toml schema", + "version": "0", + "$defs": { + "translated_string": { + "type": "object", + "required": [ + "en" + ], + "additionalProperties": false, + "patternProperties": { + "^[a-z]{2}$": { + "type": "string" + } + } + } + }, + "type": "object", + "required": [], + "additionalProperties": false, + "patternProperties": { + "^[a-z0-9_-]*$": { + "type": "object", + "required": [ + "icon", + "title", + "description" + ], + "additionalProperties": false, + "properties": { + "icon": { + "type": "string" + }, + "title": { + "$ref": "#/$defs/translated_string" + }, + "description": { + "$ref": "#/$defs/translated_string" + }, + "subtags": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[a-z_]*$": { + "type": "object", + "required": [ + "title" + ], + "additionalProperties": false, + "properties": { + "title": { + "$ref": "#/$defs/translated_string" + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/schemas/graveyard.toml.schema.json b/schemas/graveyard.toml.schema.json new file mode 100644 index 00000000..ec22f8c8 --- /dev/null +++ b/schemas/graveyard.toml.schema.json @@ -0,0 +1,48 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://github.com/YunoHost/apps/blob/master/schemas/graveyard.toml.schema.json", + "title": "Yunohost's graveyard.toml schema", + "version": "0", + "type": "object", + "required": [], + "additionalProperties": false, + "patternProperties": { + "^[a-z0-9_-]*$": { + "type": "object", + "required": [ + "url" + ], + "additionalProperties": false, + "properties": { + "category": { + "type": "string" + }, + "subtags": { + "type": "array", + "items": { + "type": "string" + }, + "additionalItems": false + }, + "url": { + "type": "string", + "format": "url" + }, + "antifeatures": { + "type": "array", + "items": { + "type": "string" + }, + "additionalItems": false + }, + "potential_alternative_to": { + "type": "array", + "items": { + "type": "string" + }, + "additionalItems": false + } + } + } + } +} \ No newline at end of file diff --git a/schemas/wishlist.toml.schema.json b/schemas/wishlist.toml.schema.json index 368db38f..b42caac1 100644 --- a/schemas/wishlist.toml.schema.json +++ b/schemas/wishlist.toml.schema.json @@ -3,14 +3,16 @@ "$id": "https://github.com/YunoHost/apps/blob/master/schemas/wishlist.toml.schema.json", "title": "Yunohost's wishlist.toml schema", "version": "0", - "type": "object", "required": [], "additionalProperties": false, "patternProperties": { "^[a-z0-9_-]*$": { "type": "object", - "required": ["name", "upstream"], + "required": [ + "name", + "upstream" + ], "additionalProperties": false, "properties": { "name": { @@ -26,9 +28,12 @@ "website": { "type": "string", "format": "url" + }, + "draft": { + "type": "string", + "format": "url" } } } } - -} +} \ No newline at end of file diff --git a/wishlist.toml b/wishlist.toml index 3419420b..510bf894 100644 --- a/wishlist.toml +++ b/wishlist.toml @@ -1,3 +1,5 @@ +#:schema https://github.com/YunoHost/apps/raw/master/schemas/wishlist.toml.schema.json + [access-to-memory-atom] name = "Access to Memory (AtoM)" description = "Standards-based archival description and access in a multilingual, multi-repository environment."