From e215a595ed5991ce4c25763b7e2eafd440d65478 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 2 May 2014 22:01:18 +0200 Subject: add app.json schema --- config/schema.json | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 config/schema.json (limited to 'config') diff --git a/config/schema.json b/config/schema.json new file mode 100644 index 000000000..47a654124 --- /dev/null +++ b/config/schema.json @@ -0,0 +1,179 @@ +{ + "title": "ownCloud App Schema", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "id": { + "type": "string", + "pattern": "^[a-z_]+$" + }, + "description": { + "type": "string" + }, + "licence": { + "type": "string", + "enum": ["AGPL", "MIT", "GPL", "LGPL", "BSD","Apache"] + }, + "version": { + "type": "string", + "pattern": "^[0-9]+(\\.[0-9]+)*$" + }, + "authors": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "pattern": "^.+@.+\\..+$" + }, + "homepage": { + "type": "string", + "pattern": "^https?://.*$" + } + }, + "required": ["name", "email"], + "additionalProperties": false + } + }, + "repository": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": ["type", "url"], + "additionalProperties": false + }, + "homepage": { + "type": "string", + "pattern": "^https?://.*$" + }, + "bugs": { + "type": "string", + "pattern": "^https?://.*$" + }, + "documentation": { + "type": "object", + "properties": { + "user": { + "type": "string", + "pattern": "^https?://.*$" + }, + "admin": { + "type": "string", + "pattern": "^https?://.*$" + }, + "developer": { + "type": "string", + "pattern": "^https?://.*$" + } + }, + "additionalProperties": false + }, + "jobs": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[a-zA-Z-_:\\\\]+$" + } + }, + "hooks": { + "type": "object", + "patternProperties": { + "^[a-zA-Z-_:\\\\]+$": { + "type": "string", + "pattern": "^[a-zA-Z-_:\\\\]+$" + } + } + }, + "navigation": { + "type": "object", + "properties": { + "route": { + "type": "string", + "pattern": "^([a-z]+(\\.[a-z]+)*)*|(/.+/.*)$" + }, + "icon": { + "type": "string" + }, + "name": { + "type": "string" + }, + "order": { + "type": "integer" + } + }, + "additionalProperties": false + }, + "databases": { + "type": "array", + "items": { + "type": "string", + "enum": ["pgsql", "mysql", "sqlite", "mssql", "oracle"] + }, + "uniqueItems": true + }, + "categories": { + "type": "array", + "items": { + "type": "string", + "enum": ["Filesystem", "Authentication", "PIM", "Multimedia", + "Productivity", "Games", "Tools", "Other"] + }, + "minItems": 1, + "uniqueItems": true + }, + "dependencies": { + "type": "object", + "properties": { + "php": { + "type": "string", + "pattern": "^((=|<|>|<=|>=)?[0-9]+(\\.[0-9]+)*(,(=|<|>|<=|>=)?[0-9]+(\\.[0-9]+)*)*|\\*)$" + }, + "apps": { + "type": "object", + "patternProperties": { + "^[a-z_]+$": { + "type": "string", + "pattern": "^((=|<|>|<=|>=)?[0-9]+(\\.[0-9]+)*(,(=|<|>|<=|>=)?[0-9]+(\\.[0-9]+)*)*|\\*)$" + } + } + }, + "libs": { + "type": "object", + "patternProperties": { + "^[a-z_]+$": { + "type": "string", + "pattern": "^((=|<|>|<=|>=)?[0-9]+(\\.[0-9]+)*(,(=|<|>|<=|>=)?[0-9]+(\\.[0-9]+)*)*|\\*)$" + } + } + }, + "owncloud": { + "type": "string", + "pattern": "^((=|<|>|<=|>=)?[0-9]+(\\.[0-9]+)*(,(=|<|>|<=|>=)?[0-9]+(\\.[0-9]+)*)*|\\*)$" + } + }, + "additionalProperties": false + } + }, + "required": [ + "name", + "id", + "description", + "licence", + "version", + "authors", + "repository" + ], + "additionalProperties": false +} \ No newline at end of file -- cgit v1.2.3