Skip to content

Commit

Permalink
Add schemas for: metadata.json (Cinnamon DE) (#4058)
Browse files Browse the repository at this point in the history
* feat(schema): support metadata.json for Cinnamon

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* feat(catalog): register Cinnamon-related schemas correctly

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 2f9057c commit ad257a0
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -6836,10 +6836,16 @@
"url": "https://json.schemastore.org/youtrack-app.json"
},
{
"name": "Cinnamon",
"description": "Settings for Cinnamon desktop environment",
"name": "Settings for a Cinnamon spice",
"description": "Settings for a Cinnamon spice",
"fileMatch": ["**/*@*/**/settings-schema.json"],
"url": "https://raw.githubusercontent.com/cinnamon-spice-settings.json"
},
{
"name": "Metadata for a Cinnamon spice",
"description": "Metadata for a Cinnamon spice",
"fileMatch": ["**/*@*/**/metadata.json"],
"url": "https://raw.githubusercontent.com/cinnamon-spice-metadata.json"
}
]
}
112 changes: 112 additions & 0 deletions src/schemas/json/cinnamon-spice-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/cinnamon-spice-metadata.json",
"definitions": {
"string-property-partial": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"version-property-partial": {
"type": "string",
"minLength": 1,
"pattern": "^\\d+(\\.\\d+){1,2}$",
"examples": ["MAJOR.MINOR.PATCH"]
}
},
"title": "extension metadata",
"description": "Metadata of Cinnamon extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html",
"type": "object",
"required": ["uuid", "name", "description"],
"properties": {
"uuid": {
"title": "uuid",
"description": "A UUID of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html",
"type": "string",
"pattern": "^[^@]+@[^@]+$",
"examples": ["EXTENSION@NICKNAME"]
},
"name": {
"$ref": "#/definitions/string-property-partial",
"title": "name",
"description": "A name of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html"
},
"description": {
"$ref": "#/definitions/string-property-partial",
"title": "description",
"description": "A description of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html"
},
"comments": {
"$ref": "#/definitions/string-property-partial",
"title": "comments",
"description": "Comments of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html"
},
"website": {
"title": "website",
"description": "A site of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html",
"type": "string",
"minLength": 1,
"pattern": "^https://"
},
"url": {
"title": "url",
"description": "A URL of repository of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html",
"type": "string",
"minLength": 1,
"pattern": "^https://"
},
"version": {
"$ref": "#/definitions/version-property-partial",
"title": "website",
"description": "A site of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html"
},
"shell-version": {
"title": "shell version",
"description": "Versions of Cinnamon supported by the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html",
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"$ref": "#/definitions/version-property-partial",
"description": "A versions of Cinnamon supported by the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html"
}
},
"author": {
"title": "author",
"description": "An author of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html",
"type": "string",
"minLength": 1,
"pattern": "\\S",
"examples": ["FIRST_NAME LAST_NAME"]
},
"contributors": {
"title": "contributors",
"description": "Contributors of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html",
"type": "string",
"minLength": 1,
"pattern": "\\S",
"examples": ["FIRST_NAME LAST_NAME - WORK_AREA"]
},
"prevent-decorations": {
"title": "prevent decorations",
"description": "Whether to prevent decorations of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html",
"type": "boolean"
},
"multiversion": {
"title": "multi version",
"description": "Whether to allow several versions of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html",
"type": "boolean",
"const": true
},
"max-instances": {
"title": "maximum instances",
"description": "A count of maximum instances of the extension\nhttps://projects.linuxmint.com/reference/git/cinnamon-tutorials/write-applet.html",
"type": "integer",
"minimum": -1
}
},
"dependencies": {
"multiversion": ["version"]
},
"additionalProperties": false
}

0 comments on commit ad257a0

Please sign in to comment.