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

Parameters meta-schema - first draft #133

Merged
merged 4 commits into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 155 additions & 0 deletions parameters_meta_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"$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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about adding a description with a link to fontaweseome?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description is a Nextflow schema thing, not a JSON schema thing (it's a non-standard field).

We already document it here: https://nextflow-io.github.io/nf-validation/nextflow_schema/nextflow_schema_specification/#fa_icon

},
"description": {
"type": "string"
},
"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", "file-path-pattern"]
},
"exists": {
"type": "boolean"
},
"mimetype": {
"type": "string",
"pattern": ".+/.+"
},
"pattern": {
"type": "string",
"minLength": 1
},
"schema": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"help_text": {
"type": "string"
},
"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"
]
}