tests fixes and some product advisories tunes ups

This commit is contained in:
master
2026-01-30 07:57:43 +02:00
parent 644887997c
commit 55744f6a39
345 changed files with 26290 additions and 2267 deletions

View File

@@ -1,84 +1,171 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://spdx.org/rdf/3.0.1/spdx-json-schema.json",
"title": "SPDX 3.0.1 JSON-LD Schema",
"description": "Schema for SPDX 3.0.1 documents in JSON-LD format",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://spdx.org/schema/3.0.1/spdx-json-schema.json",
"title": "SPDX 3.0.1 JSON-LD Schema (Structural Subset)",
"description": "Focused structural validation for SPDX 3.0.1 JSON-LD documents. Validates key requirements per SPDX 3.0.1 specification.",
"type": "object",
"required": ["@context", "@graph"],
"properties": {
"@context": {
"type": "string",
"description": "JSON-LD context for SPDX 3.0"
"const": "https://spdx.org/rdf/3.0.1/spdx-context.jsonld"
},
"@graph": {
"type": "array",
"description": "Array of SPDX elements",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"@type": { "type": "string" },
"@id": { "type": "string" },
"spdxId": { "type": "string" },
"name": { "type": "string" },
"description": { "type": "string" },
"comment": { "type": "string" },
"creationInfo": { "type": "object" },
"verifiedUsing": { "type": "array" },
"externalRef": { "type": "array" },
"externalIdentifier": { "type": "array" },
"extension": { "type": "array" }
}
"$ref": "#/$defs/GraphElement"
}
},
"spdxVersion": {
"type": "string",
"pattern": "^SPDX-3\\.[0-9]+(\\.[0-9]+)?$"
},
"creationInfo": {
}
},
"additionalProperties": false,
"$defs": {
"GraphElement": {
"type": "object",
"required": ["type"],
"properties": {
"@type": { "type": "string" },
"specVersion": { "type": "string" },
"created": { "type": "string", "format": "date-time" },
"createdBy": { "type": "array" },
"createdUsing": { "type": "array" },
"profile": { "type": "array" },
"dataLicense": { "type": "string" }
}
},
"rootElement": {
"type": "array",
"items": { "type": "string" }
},
"element": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@type": { "type": "string" },
"spdxId": { "type": "string" },
"name": { "type": "string" },
"summary": { "type": "string" },
"description": { "type": "string" },
"comment": { "type": "string" },
"verifiedUsing": { "type": "array" },
"externalRef": { "type": "array" },
"externalIdentifier": { "type": "array" }
"type": {
"type": "string",
"minLength": 1
},
"@id": {
"type": "string"
},
"spdxId": {
"type": "string"
},
"creationInfo": {
"type": "string"
},
"name": {
"type": "string"
},
"created": {
"type": "string"
},
"specVersion": {
"type": "string"
},
"createdBy": {
"type": "array",
"items": { "type": "string" }
},
"createdUsing": {
"type": "array",
"items": { "type": "string" }
},
"rootElement": {
"type": "array",
"items": { "type": "string" }
},
"element": {
"type": "array",
"items": { "type": "string" }
},
"profileConformance": {
"type": "array",
"items": { "type": "string" }
},
"software_sbomType": {
"type": "array",
"items": { "type": "string" }
},
"software_packageVersion": { "type": "string" },
"software_packageUrl": { "type": "string" },
"software_downloadLocation": { "type": "string" },
"software_primaryPurpose": { "type": "string" },
"software_copyrightText": { "type": "string" },
"simplelicensing_licenseExpression": { "type": "string" },
"from": { "type": "string" },
"relationshipType": { "type": "string" },
"to": {
"type": "array",
"items": { "type": "string" }
}
}
},
"namespaceMap": {
"type": "array",
"items": {
"type": "object",
"properties": {
"prefix": { "type": "string" },
"namespace": { "type": "string", "format": "uri" }
},
"allOf": [
{
"if": {
"properties": { "type": { "const": "CreationInfo" } },
"required": ["type"]
},
"then": {
"required": ["@id", "created", "specVersion"]
}
},
{
"if": {
"properties": { "type": { "const": "SpdxDocument" } },
"required": ["type"]
},
"then": {
"required": ["spdxId", "creationInfo", "rootElement", "element"]
}
},
{
"if": {
"properties": { "type": { "const": "software_Sbom" } },
"required": ["type"]
},
"then": {
"required": ["spdxId", "creationInfo", "rootElement", "element"]
}
},
{
"if": {
"properties": { "type": { "const": "software_Package" } },
"required": ["type"]
},
"then": {
"required": ["spdxId", "creationInfo", "name"]
}
},
{
"if": {
"properties": { "type": { "const": "software_File" } },
"required": ["type"]
},
"then": {
"required": ["spdxId", "creationInfo", "name"]
}
},
{
"if": {
"properties": { "type": { "const": "Relationship" } },
"required": ["type"]
},
"then": {
"required": ["spdxId", "creationInfo", "from", "relationshipType", "to"]
}
},
{
"if": {
"properties": { "type": { "const": "Tool" } },
"required": ["type"]
},
"then": {
"required": ["spdxId", "creationInfo", "name"]
}
},
{
"if": {
"properties": { "type": { "const": "Organization" } },
"required": ["type"]
},
"then": {
"required": ["spdxId", "creationInfo", "name"]
}
},
{
"if": {
"properties": { "type": { "const": "Person" } },
"required": ["type"]
},
"then": {
"required": ["spdxId", "creationInfo", "name"]
}
}
}
},
"imports": {
"type": "array",
"items": { "type": "string", "format": "uri" }
],
"additionalProperties": true
}
}
}