|
250 | 250 | "title": "Release notes", |
251 | 251 | "description": "Specifies release notes." |
252 | 252 | }, |
253 | | - "modelCard": { |
254 | | - "$ref": "cyclonedx-ai-modelcard-2.0.schema.json#/$defs/modelCard", |
255 | | - "title": "AI/ML Model Card" |
256 | | - }, |
257 | | - "data": { |
258 | | - "type": "array", |
259 | | - "items": {"$ref": "#/$defs/componentData"}, |
260 | | - "title": "Data", |
261 | | - "description": "This object SHOULD be specified for any component of type `data` and must not be specified for other component types." |
262 | | - }, |
263 | | - "cryptoProperties": { |
264 | | - "$ref": "cyclonedx-cryptography-2.0.schema.json#/$defs/cryptoProperties", |
265 | | - "title": "Cryptographic Properties" |
266 | | - }, |
267 | 253 | "tags": { |
268 | 254 | "$ref": "cyclonedx-common-2.0.schema.json#/$defs/tags", |
269 | 255 | "title": "Tags" |
|
282 | 268 | }, |
283 | 269 | "allOf": [ |
284 | 270 | { |
| 271 | + "title": "Versioning Requirement", |
285 | 272 | "description": "Requirement: ensure that `version` and `versionRange` are not present simultaneously.", |
286 | 273 | "not": { |
287 | 274 | "required": ["version", "versionRange"] |
288 | 275 | } |
289 | 276 | }, |
290 | 277 | { |
| 278 | + "title": "Version Range Requirement", |
291 | 279 | "description": "Requirement: 'versionRange' must not be present when 'isExternal' is `false`.", |
292 | 280 | "if": { |
293 | | - "properties": { "isExternal": { "const": false } } |
| 281 | + "required": ["versionRange"] |
294 | 282 | }, |
295 | 283 | "then": { |
296 | | - "not": { "required": ["versionRange"] } |
| 284 | + "properties": { "isExternal": { "enum": [true] } } |
| 285 | + } |
| 286 | + }, |
| 287 | + { |
| 288 | + "title": "Hardware Requirement", |
| 289 | + "description": "Requirement: Hardware components MUST NOT specify a swid or purl.", |
| 290 | + "if": { |
| 291 | + "properties": { "type": { "enum": ["device"] } } |
297 | 292 | }, |
298 | | - "else": true |
| 293 | + "then": { |
| 294 | + "not": { |
| 295 | + "anyOf": [ |
| 296 | + { "required": ["swid"] }, |
| 297 | + { "required": ["purl"] } |
| 298 | + ] |
| 299 | + } |
| 300 | + } |
| 301 | + }, |
| 302 | + { |
| 303 | + "title": "Cryptography Requirement", |
| 304 | + "description": "Requirement: cryptoProperties may only be used for cryptographic-asset.", |
| 305 | + "if": { |
| 306 | + "properties": { "type": { "enum": ["cryptographic-asset"] } } |
| 307 | + }, |
| 308 | + "then": { |
| 309 | + "properties": { |
| 310 | + "cryptoProperties": { |
| 311 | + "$ref": "cyclonedx-cryptography-2.0.schema.json#/$defs/cryptoProperties", |
| 312 | + "title": "Cryptographic Properties" |
| 313 | + } |
| 314 | + } |
| 315 | + }, |
| 316 | + "else": { |
| 317 | + "not": { "required": ["cryptoProperties"] } |
| 318 | + } |
| 319 | + }, |
| 320 | + { |
| 321 | + "title": "AI/ML Requirement", |
| 322 | + "description": "Requirement: modelCard may only be used for machine-learning-model.", |
| 323 | + "if": { |
| 324 | + "properties": { "type": { "enum": ["machine-learning-model"] } } |
| 325 | + }, |
| 326 | + "then": { |
| 327 | + "properties": { |
| 328 | + "modelCard": { |
| 329 | + "$ref": "cyclonedx-ai-modelcard-2.0.schema.json#/$defs/modelCard", |
| 330 | + "title": "AI/ML Model Card" |
| 331 | + } |
| 332 | + } |
| 333 | + }, |
| 334 | + "else": { |
| 335 | + "not": { "required": ["modelCard"] } |
| 336 | + } |
| 337 | + }, |
| 338 | + { |
| 339 | + "title": "Data Requirement", |
| 340 | + "description": "Requirement: data may only be used for components of type data.", |
| 341 | + "if": { |
| 342 | + "properties": { "type": { "enum": ["data"] } } |
| 343 | + }, |
| 344 | + "then": { |
| 345 | + "properties": { |
| 346 | + "data": { |
| 347 | + "type": "array", |
| 348 | + "items": {"$ref": "#/$defs/componentData"}, |
| 349 | + "title": "Data Properties" |
| 350 | + } |
| 351 | + } |
| 352 | + }, |
| 353 | + "else": { |
| 354 | + "not": { "required": ["data"] } |
| 355 | + } |
299 | 356 | } |
300 | 357 | ] |
301 | 358 | }, |
|
0 commit comments