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