-
Notifications
You must be signed in to change notification settings - Fork 62
Add guidelines for spdxId URI #1215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Heavily copied from https://spdx.github.io/spdx-spec/v2.3/document-creation-information/#65-spdx-document-namespace-field Signed-off-by: Arthit Suriyawongkul <[email protected]>
|
@kzantow @augelu-tng is this SPDX document namespace and element URIs pattern align with what you use currently? |
|
In our case we have very large documents. Our goal was therefore to keep the spdxId as short as possible. At the moment we use the following format:
With a custom JSON-LD context this allows to have very short spdxIds in the document: {
"@context": [
"https://spdx.org/rdf/3.0.1/spdx-context.jsonld",
{
"o": "urn:spdx.dev:17fbbbad-b3a2-5a13-9558-00e25f843ee9/output/"
}
],
"@graph": [
{
"spdxId": "o:0",
}
]
} |
|
This change seems to align with my current usage. 👍 Specifically: if the user doesn't explicitly specify a document URI, I'm following the the 2.3 guidance to generate one, e.g. |
|
One note: @augelu-tng using a custom LD context is not allowed by the spec for SPDX JSON. I am strongly in favor of leaning in to JSON LD here, as without it extensions have to be in fully expanded form, which is very large and difficult to read, but the spec is specific about using |
@kzantow we currently have a very long discussion about that at spdx/spdx-spec#1312 |
|
@kzantow It should be allowed already. The spec says: "Additional namespace mappings may be defined within a separate object within the context.". |
Heavily copied from https://spdx.github.io/spdx-spec/v2.3/document-creation-information/#65-spdx-document-namespace-field
To fix spdx/spdx-spec#1326