Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the schema link in toml files #2104

Merged
merged 12 commits into from
Mar 13, 2024
2 changes: 2 additions & 0 deletions antifeatures.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#:schema https://github.com/YunoHost/apps/blob/master/schemas/antifeatures.toml.schema.json

[tracking]
icon = "user-secret"
title.en = "Tracking"
Expand Down
2 changes: 2 additions & 0 deletions apps.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#:schema https://github.com/YunoHost/apps/raw/master/schemas/apps.toml.schema.json

[13ft]
category = "reading"
level = 7
Expand Down
2 changes: 2 additions & 0 deletions categories.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/categories.toml.schema.json

[synchronization]
icon = "cloud"
title.en = "Synchronization"
Expand Down
2 changes: 2 additions & 0 deletions graveyard.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#:schema https://github.com/YunoHost/apps/raw/master/schemas/graveyard.toml.schema.json

[anfora]
category = "social_media"
subtags = [ "pictures" ]
Expand Down
63 changes: 63 additions & 0 deletions schemas/antifeatures.toml.schema.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
}
}
}
}
48 changes: 48 additions & 0 deletions schemas/graveyard.toml.schema.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
}
13 changes: 9 additions & 4 deletions schemas/wishlist.toml.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -26,9 +28,12 @@
"website": {
"type": "string",
"format": "url"
},
"draft": {
"type": "string",
"format": "url"
}
}
}
}

}
}
2 changes: 2 additions & 0 deletions wishlist.toml
Original file line number Diff line number Diff line change
@@ -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."
Expand Down