Skip to content

Commit

Permalink
create & add a schema to antifeatures.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
OniriCorpe committed Mar 7, 2024
1 parent c95dc5c commit a46d79a
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
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
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"
}
}
}
}
}
}
}
}
}

0 comments on commit a46d79a

Please sign in to comment.