|
231 | 231 | "$ref": "#/definitions/organizationalEntity" |
232 | 232 | }, |
233 | 233 | "licenses": { |
234 | | - "type": "array", |
235 | 234 | "title": "BOM License(s)", |
236 | | - "items": {"$ref": "#/definitions/licenseChoice"} |
| 235 | + "$ref": "#/definitions/licenseChoice" |
237 | 236 | }, |
238 | 237 | "properties": { |
239 | 238 | "type": "array", |
|
435 | 434 | "items": {"$ref": "#/definitions/hash"} |
436 | 435 | }, |
437 | 436 | "licenses": { |
438 | | - "type": "array", |
439 | | - "items": {"$ref": "#/definitions/licenseChoice"}, |
| 437 | + "$ref": "#/definitions/licenseChoice", |
440 | 438 | "title": "Component License(s)" |
441 | 439 | }, |
442 | 440 | "copyright": { |
|
866 | 864 | } |
867 | 865 | }, |
868 | 866 | "licenseChoice": { |
869 | | - "type": "object", |
870 | | - "title": "License(s)", |
871 | | - "additionalProperties": false, |
872 | | - "properties": { |
873 | | - "license": { |
874 | | - "$ref": "#/definitions/license" |
875 | | - }, |
876 | | - "expression": { |
877 | | - "type": "string", |
878 | | - "title": "SPDX License Expression", |
879 | | - "examples": [ |
880 | | - "Apache-2.0 AND (MIT OR GPL-2.0-only)", |
881 | | - "GPL-3.0-only WITH Classpath-exception-2.0" |
882 | | - ] |
883 | | - } |
884 | | - }, |
885 | | - "oneOf":[ |
| 867 | + "type": "array", |
| 868 | + "title": "License Choice", |
| 869 | + "description": "EITHER (a list of SPDX and/or named licenses) OR (a list of one SPDX License Expression)", |
| 870 | + "oneOf": [ |
886 | 871 | { |
887 | | - "required": ["license"] |
| 872 | + "description": "a list of SPDX and/or named licenses", |
| 873 | + "items": { |
| 874 | + "type": "object", |
| 875 | + "required": ["license"], |
| 876 | + "additionalProperties": false, |
| 877 | + "properties": { |
| 878 | + "license": {"$ref": "#/definitions/license"} |
| 879 | + } |
| 880 | + } |
888 | 881 | }, |
889 | 882 | { |
890 | | - "required": ["expression"] |
| 883 | + "description": "a list of one SPDX License Expression", |
| 884 | + "additionalItems": false, |
| 885 | + "minItems": 1, |
| 886 | + "maxItems": 1, |
| 887 | + "items": [{ |
| 888 | + "type": "object", |
| 889 | + "required": ["expression"], |
| 890 | + "additionalProperties": false, |
| 891 | + "properties": { |
| 892 | + "expression": { |
| 893 | + "type": "string", |
| 894 | + "title": "SPDX License Expression", |
| 895 | + "examples": [ |
| 896 | + "Apache-2.0 AND (MIT OR GPL-2.0-only)", |
| 897 | + "GPL-3.0-only WITH Classpath-exception-2.0" |
| 898 | + ] |
| 899 | + } |
| 900 | + } |
| 901 | + }] |
891 | 902 | } |
892 | 903 | ] |
893 | 904 | }, |
|
1235 | 1246 | "description": "Specifies information about the data including the directional flow of data and the data classification." |
1236 | 1247 | }, |
1237 | 1248 | "licenses": { |
1238 | | - "type": "array", |
1239 | | - "items": {"$ref": "#/definitions/licenseChoice"}, |
| 1249 | + "$ref": "#/definitions/licenseChoice", |
1240 | 1250 | "title": "Component License(s)" |
1241 | 1251 | }, |
1242 | 1252 | "externalReferences": { |
|
1512 | 1522 | } |
1513 | 1523 | }, |
1514 | 1524 | "licenses": { |
1515 | | - "type": "array", |
1516 | | - "items": {"$ref": "#/definitions/licenseChoice"}, |
| 1525 | + "$ref": "#/definitions/licenseChoice", |
1517 | 1526 | "title": "Component License(s)" |
1518 | 1527 | }, |
1519 | 1528 | "copyright": { |
|
0 commit comments