|
1 | 1 | { |
2 | | - "$schema": "http://json-schema.org/draft-07/schema", |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
3 | 3 | "title": "Meta yaml", |
4 | 4 | "description": "Validate the meta yaml file for an nf-core module", |
5 | 5 | "type": "object", |
|
12 | 12 | "type": "string", |
13 | 13 | "description": "Description of the module" |
14 | 14 | }, |
| 15 | + "deprecated": { |
| 16 | + "type": "boolean", |
| 17 | + "description": "Whether the module is deprecated and should not be used in new pipelines" |
| 18 | + }, |
15 | 19 | "keywords": { |
16 | 20 | "type": "array", |
17 | 21 | "description": "Keywords for the module", |
|
53 | 57 | "pattern": "^https?://.*$" |
54 | 58 | }, |
55 | 59 | "doi": { |
| 60 | + "type": "string", |
56 | 61 | "description": "DOI of the tool", |
57 | 62 | "anyOf": [ |
58 | 63 | { |
59 | | - "type": "string", |
60 | 64 | "pattern": "^10\\.\\d{4,9}\\/[^,]+$" |
61 | 65 | }, |
62 | 66 | { |
63 | | - "type": "string", |
64 | 67 | "enum": ["no DOI available"] |
65 | 68 | } |
66 | 69 | ] |
|
114 | 117 | } |
115 | 118 | }, |
116 | 119 | "input": { |
117 | | - "type": "array", |
118 | | - "description": "Input channels for the module", |
119 | | - "items": { |
120 | | - "oneOf": [ |
121 | | - { |
122 | | - "$ref": "#/definitions/channelElement" |
123 | | - }, |
124 | | - { |
125 | | - "type": "array", |
126 | | - "items": { |
127 | | - "$ref": "#/definitions/channelElement" |
128 | | - } |
129 | | - } |
130 | | - ] |
131 | | - } |
| 120 | + "$ref": "#/$defs/channelArray", |
| 121 | + "description": "Input channels for the module" |
132 | 122 | }, |
133 | 123 | "output": { |
134 | | - "type": "object", |
135 | | - "description": "Output channels for the module", |
136 | | - "patternProperties": { |
137 | | - ".*": { |
138 | | - "$ref": "#/definitions/channelArray" |
139 | | - } |
140 | | - } |
| 124 | + "$ref": "#/$defs/channelMap", |
| 125 | + "description": "Output channels for the module" |
141 | 126 | }, |
142 | 127 | "topics": { |
143 | | - "type": "object", |
144 | | - "description": "Topics of the module", |
145 | | - "patternProperties": { |
146 | | - ".*": { |
147 | | - "$ref": "#/definitions/channelArray" |
148 | | - } |
149 | | - } |
| 128 | + "$ref": "#/$defs/channelMap", |
| 129 | + "description": "Topics of the module" |
150 | 130 | }, |
151 | 131 | "authors": { |
152 | 132 | "type": "array", |
|
170 | 150 | "type": "object", |
171 | 151 | "description": "Docker containers for different architectures", |
172 | 152 | "additionalProperties": { |
173 | | - "$ref": "#/definitions/container" |
| 153 | + "$ref": "#/$defs/container" |
174 | 154 | } |
175 | 155 | }, |
176 | 156 | "singularity": { |
177 | 157 | "type": "object", |
178 | 158 | "description": "Singularity containers for different architectures", |
179 | 159 | "additionalProperties": { |
180 | | - "allOf": [ |
181 | | - { |
182 | | - "$ref": "#/definitions/container" |
183 | | - }, |
184 | | - { |
185 | | - "properties": { |
186 | | - "name": { |
187 | | - "pattern": "^oras://.*$" |
188 | | - } |
189 | | - }, |
190 | | - "required": ["https"] |
| 160 | + "$ref": "#/$defs/container", |
| 161 | + "properties": { |
| 162 | + "name": { |
| 163 | + "pattern": "^oras://.*$" |
191 | 164 | } |
192 | | - ] |
| 165 | + }, |
| 166 | + "required": ["https"] |
193 | 167 | } |
194 | 168 | }, |
195 | 169 | "conda": { |
196 | 170 | "type": "object", |
197 | 171 | "description": "Conda lock files for different architectures", |
198 | 172 | "additionalProperties": { |
199 | | - "$ref": "#/definitions/condaLockFile" |
| 173 | + "type": "object", |
| 174 | + "description": "Conda lock file information", |
| 175 | + "properties": { |
| 176 | + "lock_file": { |
| 177 | + "type": "string", |
| 178 | + "description": "Path to the conda lock file, relative to the repository root", |
| 179 | + "pattern": "^.*\\.conda-lock/.*\\.txt$" |
| 180 | + } |
| 181 | + }, |
| 182 | + "required": ["lock_file"] |
200 | 183 | } |
201 | 184 | } |
202 | 185 | } |
203 | 186 | } |
204 | 187 | }, |
205 | | - "definitions": { |
| 188 | + "$defs": { |
| 189 | + "channelMap": { |
| 190 | + "type": "object", |
| 191 | + "patternProperties": { |
| 192 | + ".*": { |
| 193 | + "$ref": "#/$defs/channelArray" |
| 194 | + } |
| 195 | + } |
| 196 | + }, |
206 | 197 | "channelElement": { |
207 | 198 | "type": "object", |
208 | 199 | "patternProperties": { |
209 | 200 | ".*": { |
210 | | - "$ref": "#/definitions/elementProperties" |
| 201 | + "$ref": "#/$defs/elementProperties" |
211 | 202 | } |
212 | 203 | } |
213 | 204 | }, |
|
216 | 207 | "items": { |
217 | 208 | "oneOf": [ |
218 | 209 | { |
219 | | - "$ref": "#/definitions/channelElement" |
| 210 | + "$ref": "#/$defs/channelElement" |
220 | 211 | }, |
221 | 212 | { |
222 | 213 | "type": "array", |
223 | 214 | "items": { |
224 | | - "$ref": "#/definitions/channelElement" |
| 215 | + "$ref": "#/$defs/channelElement" |
225 | 216 | } |
226 | 217 | } |
227 | 218 | ] |
|
291 | 282 | } |
292 | 283 | }, |
293 | 284 | "required": ["name", "build_id"] |
294 | | - }, |
295 | | - "condaLockFile": { |
296 | | - "type": "object", |
297 | | - "description": "Conda lock file information", |
298 | | - "properties": { |
299 | | - "lock_file": { |
300 | | - "type": "string", |
301 | | - "description": "Path to the conda lock file, relative to the repository root", |
302 | | - "pattern": "^.*\\.conda-lock/.*\\.txt$" |
303 | | - } |
304 | | - }, |
305 | | - "required": ["lock_file"] |
306 | 285 | } |
307 | 286 | }, |
308 | 287 | "required": ["name", "description", "keywords", "authors", "output", "tools"] |
|
0 commit comments