Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Parameters meta-schema - first draft
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed Nov 17, 2023
1 parent 975bc99 commit 5f95779
Showing 1 changed file with 158 additions and 0 deletions.
158 changes: 158 additions & 0 deletions parameters_meta_schema.json
Original file line number Diff line number Diff line change
@@ -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"
]
}

0 comments on commit 5f95779

Please sign in to comment.