diff --git a/modules/meta-schema.json b/modules/meta-schema.json index 0b855d76d07..e22712a5092 100644 --- a/modules/meta-schema.json +++ b/modules/meta-schema.json @@ -38,76 +38,14 @@ "type": "array", "description": "Input channels for the module", "items": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of the input channel", - "enum": ["map", "file", "directory", "string", "integer", "float", "boolean", "list"] - }, - "description": { - "type": "string", - "description": "Description of the input channel" - }, - "pattern": { - "type": "string", - "description": "Pattern of the input channel, given in Java glob syntax" - }, - "default": { - "type": ["string", "number", "boolean", "array", "object"], - "description": "Default value for the input channel" - }, - "enum": { - "type": "array", - "description": "List of allowed values for the input channel", - "items": { - "type": ["string", "number", "boolean", "array", "object"] - }, - "uniqueItems": true - } - }, - "required": ["type", "description"] - } - } + "type": "array", "items": { "$ref": "#/definitions/elementProperties" } } }, "output": { "type": "array", "description": "Output channels for the module", "items": { - "type": "object", - "patternProperties": { - ".*": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "Type of the output channel", - "enum": ["map", "file", "directory", "string", "integer", "float", "boolean", "list"] - }, - "description": { - "type": "string", - "description": "Description of the output channel" - }, - "pattern": { - "type": "string", - "description": "Pattern of the input channel, given in Java glob syntax" - }, - "enum": { - "type": "array", - "description": "List of allowed values for the output channel", - "items": { - "type": ["string", "number", "boolean", "array", "object"] - }, - "uniqueItems": true - } - }, - "required": ["type", "description"] - } - } + "type": "object", "items": { "$ref": "#/definitions/elementProperties" } } }, "tools": { @@ -160,6 +98,11 @@ "minItems": 1, "uniqueItems": true, "message": "Licence must be an array of one or more entries, e.g. [\"MIT\"]" + }, + "identifier": { + "type": "string", + "description": "bio.tools identifier of the tool", + "pattern": "^biotools:.*$" } }, "required": ["description"], @@ -182,5 +125,53 @@ } } }, + "definitions": { + "elementProperties": { + "type": "object", + "patternProperties": { + ".*": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of the channel element", + "enum": ["map", "file", "directory", "string", "integer", "float", "boolean", "list"] + }, + "description": { + "type": "string", + "description": "Description of the channel" + }, + "pattern": { + "type": "string", + "description": "Pattern of the channel, given in Java glob syntax" + }, + "enum": { + "type": "array", + "description": "List of allowed values for the channel", + "items": { + "type": ["string", "number", "boolean", "array", "object"] + }, + "uniqueItems": true + }, + "ontologies": { + "type": "array", + "description": "List of ontologies for the channel", + "uniqueItems": true, + "items": { + "type": "object", + "patternProperties": { + ".*": { + "type": "string", + "pattern": "^(http|https)://.*" + } + } + } + } + }, + "required": ["type", "description"] + } + } + } + }, "required": ["name", "description", "keywords", "authors", "output", "tools"] }