diff --git a/parameters_meta_schema.json b/parameters_meta_schema.json new file mode 100644 index 00000000..ece1504b --- /dev/null +++ b/parameters_meta_schema.json @@ -0,0 +1,158 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://nextflow.io", + "title": "Nextflow Schema Meta-schema", + "description": "Meta-schema to validate Nextflow parameter schema files", + "type": "object", + "properties": { + "$schema": { + "title": "schema", + "type": "string", + "minLength": 1 + }, + "$id": { + "title": "ID URI", + "type": "string", + "minLength": 1 + }, + "title": { + "title": "Title", + "type": "string", + "minLength": 1 + }, + "description": { + "title": "Description", + "type": "string", + "minLength": 1 + }, + "type": { + "title": "Top level type", + "type": "string", + "const": "object" + }, + "definitions": { + "title": "Parameter groups", + "type": "object", + "patternProperties": { + "^.*$": { + "type": "object", + "required": [ + "title", + "type", + "properties" + ], + "properties": { + "title": { + "type": "string", + "minLength": 1 + }, + "type": { + "const": "object" + }, + "fa_icon": { + "type": "string", + "pattern": "^fa" + }, + "description": { + "type": "string", + "minLength": 1 + }, + "required": { + "type": "array" + }, + "properties": { + "type": "object", + "patternProperties": { + "^.*$": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": ["string", "boolean", "integer", "number"] + }, + "format": { + "type": "string", + "enum": ["file-path", "directory-path", "path"] + }, + "exists": { + "type": "boolean" + }, + "mimetype": { + "type": "string", + "pattern": ".+/.+" + }, + "pattern": { + "type": "string", + "minLength": 1 + }, + "schema": { + "type": "string", + "minLength": 1 + }, + "description": { + "type": "string", + "minLength": 1 + }, + "help_text": { + "type": "string", + "minLength": 1 + }, + "fa_icon": { + "type": "string", + "pattern": "^fa" + }, + "errorMessage": { + "type": "string", + "minLength": 1 + }, + "hidden": { + "type": "boolean" + }, + "minLength": { + "type": "integer" + }, + "maxLength": { + "type": "integer" + }, + "minimum": { + "type": "integer" + }, + "maximum": { + "type": "integer" + } + } + } + } + } + } + } + } + }, + "allOf": { + "title": "Combine definition groups", + "type": "array", + "items": { + "type": "object", + "required": [ + "$ref" + ], + "properties": { + "$ref": { + "type": "string", + "pattern": "^#/definitions/" + } + } + } + } + }, + "required": [ + "$schema", + "$id", + "title", + "description", + "type" + ] +}