From eebf3a050c7fbcd19b121e59a4b39eaaa22df03d Mon Sep 17 00:00:00 2001 From: Adrian Braemer Date: Tue, 18 Feb 2025 16:09:03 +0100 Subject: [PATCH 1/2] feat: update input file schema to include license classification --- .../input/OpossumInputFileSchema.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/ElectronBackend/input/OpossumInputFileSchema.json b/src/ElectronBackend/input/OpossumInputFileSchema.json index 44f57b173..c1bba8d53 100644 --- a/src/ElectronBackend/input/OpossumInputFileSchema.json +++ b/src/ElectronBackend/input/OpossumInputFileSchema.json @@ -11,6 +11,18 @@ ], "additionalProperties": false, "properties": { + "config": { + "type": "object", + "description": "Additional configuration for OpossumUI.", + "additionalProperties": true, + "properties": { + "classifications": { + "type": "object", + "description": "Mapping of classification values to human-readable labels. See \"classification\" field of \"externalAttribution\".", + "additionalProperties": true + } + } + }, "resources": { "id": "#ResourcesSchema", "type": "object", @@ -121,6 +133,11 @@ "type": "string", "description": "Indication on how critical a signal is. Possible values are \"high\" and \"medium\"." }, + "classification": { + "type": "number", + "description": "Signal classification by usage, usually based on the license. Zero corresponds to unrestricted usage ehile higher levels mean more and more restrictions. Exact values and labels need to be configured in the config section.", + "minimum": 0 + }, "copyright": { "type": "string", "description": "Copyright of the package" From a2f81666a8a77c6dc43f03c297e751146c4febdb Mon Sep 17 00:00:00 2001 From: Adrian Braemer Date: Thu, 20 Feb 2025 08:10:18 +0100 Subject: [PATCH 2/2] feat: update schema --- .../input/OpossumInputFileSchema.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ElectronBackend/input/OpossumInputFileSchema.json b/src/ElectronBackend/input/OpossumInputFileSchema.json index c1bba8d53..79fbca7e5 100644 --- a/src/ElectronBackend/input/OpossumInputFileSchema.json +++ b/src/ElectronBackend/input/OpossumInputFileSchema.json @@ -13,13 +13,17 @@ "properties": { "config": { "type": "object", - "description": "Additional configuration for OpossumUI.", - "additionalProperties": true, + "description": "Configuration for OpossumUI.", "properties": { "classifications": { "type": "object", "description": "Mapping of classification values to human-readable labels. See \"classification\" field of \"externalAttribution\".", - "additionalProperties": true + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "type": "string" + } + } } } }, @@ -135,7 +139,7 @@ }, "classification": { "type": "number", - "description": "Signal classification by usage, usually based on the license. Zero corresponds to unrestricted usage ehile higher levels mean more and more restrictions. Exact values and labels need to be configured in the config section.", + "description": "Signal classification by usage, usually based on the license. Zero corresponds to unrestricted usage while higher levels mean more and more restrictions. Exact values and labels need to be configured in the config section.", "minimum": 0 }, "copyright": {