|
194 | 194 | "$ref": "#/definitions/organizationalEntity" |
195 | 195 | }, |
196 | 196 | "licenses": { |
197 | | - "type": "array", |
198 | 197 | "title": "BOM License(s)", |
199 | | - "additionalItems": false, |
200 | | - "items": {"$ref": "#/definitions/licenseChoice"} |
| 198 | + "$ref": "#/definitions/licenseChoice" |
201 | 199 | }, |
202 | 200 | "properties": { |
203 | 201 | "type": "array", |
|
404 | 402 | "items": {"$ref": "#/definitions/hash"} |
405 | 403 | }, |
406 | 404 | "licenses": { |
407 | | - "type": "array", |
408 | | - "additionalItems": false, |
409 | | - "items": {"$ref": "#/definitions/licenseChoice"}, |
| 405 | + "$ref": "#/definitions/licenseChoice", |
410 | 406 | "title": "Component License(s)" |
411 | 407 | }, |
412 | 408 | "copyright": { |
|
845 | 841 | } |
846 | 842 | }, |
847 | 843 | "licenseChoice": { |
848 | | - "type": "object", |
849 | | - "title": "License(s)", |
850 | | - "additionalProperties": false, |
851 | | - "properties": { |
852 | | - "license": { |
853 | | - "$ref": "#/definitions/license" |
854 | | - }, |
855 | | - "expression": { |
856 | | - "type": "string", |
857 | | - "title": "SPDX License Expression", |
858 | | - "examples": [ |
859 | | - "Apache-2.0 AND (MIT OR GPL-2.0-only)", |
860 | | - "GPL-3.0-only WITH Classpath-exception-2.0" |
861 | | - ] |
862 | | - } |
863 | | - }, |
864 | | - "oneOf":[ |
| 844 | + "type": "array", |
| 845 | + "title": "License Choice", |
| 846 | + "description": "EITHER (a list of SPDX and/or named licenses) OR (a list of one SPDX License Expression)", |
| 847 | + "oneOf": [ |
865 | 848 | { |
866 | | - "required": ["license"] |
| 849 | + "description": "a list of SPDX and/or named licenses", |
| 850 | + "items": { |
| 851 | + "type": "object", |
| 852 | + "required": ["license"], |
| 853 | + "additionalProperties": false, |
| 854 | + "properties": { |
| 855 | + "license": {"$ref": "#/definitions/license"} |
| 856 | + } |
| 857 | + } |
867 | 858 | }, |
868 | 859 | { |
869 | | - "required": ["expression"] |
| 860 | + "description": "a list of one SPDX License Expression", |
| 861 | + "additionalItems": false, |
| 862 | + "minItems": 1, |
| 863 | + "maxItems": 1, |
| 864 | + "items": [{ |
| 865 | + "type": "object", |
| 866 | + "required": ["expression"], |
| 867 | + "additionalProperties": false, |
| 868 | + "properties": { |
| 869 | + "expression": { |
| 870 | + "type": "string", |
| 871 | + "title": "SPDX License Expression", |
| 872 | + "examples": [ |
| 873 | + "Apache-2.0 AND (MIT OR GPL-2.0-only)", |
| 874 | + "GPL-3.0-only WITH Classpath-exception-2.0" |
| 875 | + ] |
| 876 | + } |
| 877 | + } |
| 878 | + }] |
870 | 879 | } |
871 | 880 | ] |
872 | 881 | }, |
|
1216 | 1225 | "description": "Specifies information about the data including the directional flow of data and the data classification." |
1217 | 1226 | }, |
1218 | 1227 | "licenses": { |
1219 | | - "type": "array", |
1220 | | - "additionalItems": false, |
1221 | | - "items": {"$ref": "#/definitions/licenseChoice"}, |
| 1228 | + "$ref": "#/definitions/licenseChoice", |
1222 | 1229 | "title": "Component License(s)" |
1223 | 1230 | }, |
1224 | 1231 | "externalReferences": { |
|
1503 | 1510 | } |
1504 | 1511 | }, |
1505 | 1512 | "licenses": { |
1506 | | - "type": "array", |
1507 | | - "additionalItems": false, |
1508 | | - "items": {"$ref": "#/definitions/licenseChoice"}, |
| 1513 | + "$ref": "#/definitions/licenseChoice", |
1509 | 1514 | "title": "Component License(s)" |
1510 | 1515 | }, |
1511 | 1516 | "copyright": { |
|
0 commit comments