spdx / spdx-3-serialization-prototype-playground Goto Github PK
View Code? Open in Web Editor NEWTEMPORARY repo to contain different draft examples for SPDX 3.0 serializations
License: Creative Commons Zero v1.0 Universal
TEMPORARY repo to contain different draft examples for SPDX 3.0 serializations
License: Creative Commons Zero v1.0 Universal
The purpose of the playground is to brainstorm and explore serialization approaches, so any serialization data formats and code are fine - the only requirement is that they must conform to the spdx-3-model, including adapting to the model as PRs are accepted into it.
That is the reason for using camelCase property names, the model (e.g., Element) requires them.
@nishakm: with that in mind, here are some random thoughts on simple_acme.json:
spdxId
property. That isn't immediately obvious from the model file; the only way to tell is that datatypes don't have SubclassOf
metadata that chains back to Element. "creationInfo": {
"spdxId": "urn:sbom-acme-timestamp-5cfc33f3-9a0b-436c-8d81-bc8d9ed8ae25",
"specVersion": "3.0.0",
"created": "2023-07-28T15:58:20Z",
"createdBy": [
"urn:[email protected]",
"urn:acme.com-4fe40e24-20e3-11ee-be56-0242ac120002"
],
"profile": [
"CORE",
"SOFTWARE"
],
"dataLicense": "CC0-1.0",
"createdUsing": []
},
profile
has type ProfileIdentifierType which also uses camelCase names, not CAPITALS. I hadn't noticed that until just now, and need to change my examples from PascalCase to camelCase profiles.element
property in the payload. Note that the logical model does not define serialization format, so having elements
and releationships
properties is not wrong, you just need to be able to reconstruct every element type when parsing the payload.Hello, I have troubles using the combination because ProfileIdentifierType class uses capital words such as CORE and SOFTWARE while json uses "core" and "software". Did you change that in spdx-tools ?
This is a manual conversion of the json file to its potential jsonld representation. The source was https://github.com/spdx/spdx-3-serialization-prototype-playground/blob/c7e5a3e7f4a09bbf9629aa0786f150e5f8a40aa8/implementations/4/app_compact.py and this was requested by @nishakm .
{
"@context": [
"https://spdx.github.io/spdx-3-model/rdf/context.json"
],
"@graph": [
{
"@id": "urn:[email protected]",
"@type": "Person",
"creationInfo": "_:creationInfo"
},
{
"@id": "urn:relationship-acme-app-8f833b36-20e3-11ee-be56-0242ac120002",
"@type": "Relationship",
"creationInfo": "_:creationInfo",
"relationshipType": "availablefrom",
"fromElement": "urn:product-acme-application-1.3-8f833b36-20e3-11ee-be56-0242ac120002",
"to": [
"urn:[email protected]",
"urn:acme.com-4fe40e24-20e3-11ee-be56-0242ac120002"
]
},
{
"@id": "urn:acme.com-4fe40e24-20e3-11ee-be56-0242ac120002",
"@type": "Organization",
"creationInfo": "_:creationInfo"
},
{
"@id": "urn:sbom-acme-application-8f833b36-20e3-11ee-be56-0242ac120002",
"@type": "SpdxDocument",
"name": "acme-application",
"creationInfo": {
"@id": "_:creationInfo",
"specVersion": "3.0.0",
"created": "2023-08-17T15:19:31Z",
"createdBy": [
"urn:[email protected]",
"urn:acme.com-4fe40e24-20e3-11ee-be56-0242ac120002"
],
"profile": [
"core",
"software"
],
"dataLicense": "CC0-1.0",
"createdUsing": [
"app_compact.py"
]
},
"element": [
"urn:product-acme-application-1.3-8f833b36-20e3-11ee-be56-0242ac120002",
"urn:acme.com-4fe40e24-20e3-11ee-be56-0242ac120002",
"urn:[email protected]",
"urn:relationship-acme-app-8f833b36-20e3-11ee-be56-0242ac120002"
],
"rootElement": [
"urn:product-acme-application-1.3-8f833b36-20e3-11ee-be56-0242ac120002"
]
},
{
"@id": "urn:product-acme-application-1.3-8f833b36-20e3-11ee-be56-0242ac120002",
"@type": "Package",
"creationInfo": "_:creationInfo",
"name": "acme-application",
"packageVersion": "1.3"
}
]
}
Line 93: (permalink):
Typo: "$ref": "NamespaeMap.json"
in context:
"namespaceMap": {
"type": "array",
"items": {
"$ref": "NamespaeMap.json"
}
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.