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

Commit bc51bc5

Browse files
authored
Merge pull request #133 from nextflow-io/meta-schema
Parameters meta-schema - first draft
2 parents 975bc99 + e1e95cb commit bc51bc5

File tree

1 file changed

+155
-0
lines changed

1 file changed

+155
-0
lines changed

parameters_meta_schema.json

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema",
3+
"$id": "https://nextflow.io",
4+
"title": "Nextflow Schema Meta-schema",
5+
"description": "Meta-schema to validate Nextflow parameter schema files",
6+
"type": "object",
7+
"properties": {
8+
"$schema": {
9+
"title": "schema",
10+
"type": "string",
11+
"minLength": 1
12+
},
13+
"$id": {
14+
"title": "ID URI",
15+
"type": "string",
16+
"minLength": 1
17+
},
18+
"title": {
19+
"title": "Title",
20+
"type": "string",
21+
"minLength": 1
22+
},
23+
"description": {
24+
"title": "Description",
25+
"type": "string",
26+
"minLength": 1
27+
},
28+
"type": {
29+
"title": "Top level type",
30+
"type": "string",
31+
"const": "object"
32+
},
33+
"definitions": {
34+
"title": "Parameter groups",
35+
"type": "object",
36+
"patternProperties": {
37+
"^.*$": {
38+
"type": "object",
39+
"required": [
40+
"title",
41+
"type",
42+
"properties"
43+
],
44+
"properties": {
45+
"title": {
46+
"type": "string",
47+
"minLength": 1
48+
},
49+
"type": {
50+
"const": "object"
51+
},
52+
"fa_icon": {
53+
"type": "string",
54+
"pattern": "^fa"
55+
},
56+
"description": {
57+
"type": "string"
58+
},
59+
"required": {
60+
"type": "array"
61+
},
62+
"properties": {
63+
"type": "object",
64+
"patternProperties": {
65+
"^.*$": {
66+
"type": "object",
67+
"required": [
68+
"type"
69+
],
70+
"properties": {
71+
"type": {
72+
"type": "string",
73+
"enum": ["string", "boolean", "integer", "number"]
74+
},
75+
"format": {
76+
"type": "string",
77+
"enum": ["file-path", "directory-path", "path", "file-path-pattern"]
78+
},
79+
"exists": {
80+
"type": "boolean"
81+
},
82+
"mimetype": {
83+
"type": "string",
84+
"pattern": ".+/.+"
85+
},
86+
"pattern": {
87+
"type": "string",
88+
"minLength": 1
89+
},
90+
"schema": {
91+
"type": "string",
92+
"minLength": 1
93+
},
94+
"description": {
95+
"type": "string"
96+
},
97+
"help_text": {
98+
"type": "string"
99+
},
100+
"fa_icon": {
101+
"type": "string",
102+
"pattern": "^fa"
103+
},
104+
"errorMessage": {
105+
"type": "string",
106+
"minLength": 1
107+
},
108+
"hidden": {
109+
"type": "boolean"
110+
},
111+
"minLength": {
112+
"type": "integer"
113+
},
114+
"maxLength": {
115+
"type": "integer"
116+
},
117+
"minimum": {
118+
"type": "integer"
119+
},
120+
"maximum": {
121+
"type": "integer"
122+
}
123+
}
124+
}
125+
}
126+
}
127+
}
128+
}
129+
}
130+
},
131+
"allOf": {
132+
"title": "Combine definition groups",
133+
"type": "array",
134+
"items": {
135+
"type": "object",
136+
"required": [
137+
"$ref"
138+
],
139+
"properties": {
140+
"$ref": {
141+
"type": "string",
142+
"pattern": "^#/definitions/"
143+
}
144+
}
145+
}
146+
}
147+
},
148+
"required": [
149+
"$schema",
150+
"$id",
151+
"title",
152+
"description",
153+
"type"
154+
]
155+
}

0 commit comments

Comments
 (0)