Skip to content

[3.0] Use MAJOR.MINOR version JSON-LD context URL in example - #1247

Open
bact wants to merge 6 commits into
spdx:support/3.0from
bact:update-context-url-in-example-30
Open

[3.0] Use MAJOR.MINOR version JSON-LD context URL in example#1247
bact wants to merge 6 commits into
spdx:support/3.0from
bact:update-context-url-in-example-30

Conversation

@bact

@bact bact commented Jul 24, 2025

Copy link
Copy Markdown
Collaborator

This PR targets support/3.0 branch.
A similar PR for develop is at #1244

To use "3.0" RDF URLs (version without patch version), as required by spdx/spdx-3-model#1046, we need to verify if new RDF URLs are working.

We may check that with an SBOM example (examples/jsonld/package_sbom.json) and the example validation workflow in this repo.

This issue may not directly affect the texts in the ISO publication but without the fix the texts in ISO publication may not back with relevant working URLs.

bact added 2 commits July 24, 2025 12:31
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact added ISO publication Last minute publication (considerations for markdown to word) ci Dev workflow and repo management labels Jul 24, 2025
@bact

bact commented Jul 24, 2025

Copy link
Copy Markdown
Collaborator Author

The example validation failed, because https://spdx.org/schema/3.0/spdx-json-schema.json is not exist yet.

@bact bact added this to the 3.0.1 milestone Jul 24, 2025
@zvr zvr removed the ISO publication Last minute publication (considerations for markdown to word) label Jul 25, 2025
@bact bact modified the milestones: 3.0.1, 3.0.2 Aug 5, 2025
@goneall

goneall commented Oct 10, 2025

Copy link
Copy Markdown
Member

The URL now appears to work - @bact - can you re-trigger the CI - perhaps by rebasing - and see if it passes?

@bact

bact commented Oct 10, 2025

Copy link
Copy Markdown
Collaborator Author

We don't yet have a clear path to republish support/3.0 yet.

As I understand, if we are still in 3.0.x and don't have 3.1 yet, do we have to push support/3.0 to main first?

@goneall

goneall commented Nov 14, 2025

Copy link
Copy Markdown
Member

We don't yet have a clear path to republish support/3.0 yet.

As I understand, if we are still in 3.0.x and don't have 3.1 yet, do we have to push support/3.0 to main first?

@bact - do we need to resolve the republish issue to merge this PR? If not, I just want to make sure the CI passes and I can't re-trigger it myself.

@goneall

goneall commented Jan 16, 2026

Copy link
Copy Markdown
Member

I just created #1331 to force a validation. It failed with the following:

Run ./bin/check-examples.sh
Checking ./bin/../examples/jsonld/package_sbom.json
Schema validation errors were encountered.
  ./bin/../examples/jsonld/package_sbom.json::$['@context']: 'https://spdx.org/rdf/3.0.1/spdx-context.jsonld' was expected

@JPEWdev @bact @zvr - Do we need to update the checks? I haven't spent too much time looking into the error.

bact added 2 commits January 19, 2026 21:02
Add something to trigger the CI.

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Also print all URLs to assist debugging

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact

bact commented Jan 19, 2026

Copy link
Copy Markdown
Collaborator Author

From the run log:

Schema           : https://spdx.org/schema/3.0/spdx-json-schema.json
Schema resolved  : 
RDF              : https://spdx.org/rdf/3.0/spdx-model.ttl
RDF resolved     : https://spdx.github.io/spdx-spec/v3.0/rdf/spdx-model.ttl
Context          : https://spdx.org/rdf/3.0/spdx-context.jsonld
Context resolved : https://spdx.github.io/spdx-spec/v3.0/rdf/spdx-context.jsonld

The content of these files have to be the updated ones with "3.0" (not "3.0.1") version in URLs or term IRIs.

@bact bact added the URL URL, IRI, redirection, content negotiation and related matters label Jan 20, 2026
bact added 2 commits July 9, 2026 23:35
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact

bact commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator Author

https://spdx.org/rdf/3.0/spdx-context.jsonld still redirects to a context document with https://spdx.org/rdf/3.0.1/terms/ as base IRI.

For ISO version, the base IRI is now https://spdx.org/rdf/3.0/terms/.
For the most recent version, the base IRI is https://spdx.org/rdf/3/terms/.

@goneall

goneall commented Jul 17, 2026

Copy link
Copy Markdown
Member

The redirect is to the github.io page for the context which is still generating URI's with the patch version.

If we push out a new context file without the patch version for the 3.0.1 branch, it will likely break many tools that are using the patch version.

Do we need to do a new release 3.0.2 with the major and minor version?

@zvr @bact @JPEWdev - thoughts?

@bact

bact commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

To keep existing tools work without the need to update anything,

https://spdx.org/rdf/3.0.1/spdx-context.jsonld may keep using https://spdx.org/rdf/3.0.1/terms/ as base IRI for terms.

https://spdx.org/rdf/3.0/spdx-context.jsonld (which will be considered as the latest within 3.0 series looking forward, including 3.0.2) and any https://spdx.org/rdf/3.x/spdx-context.jsonld should use https://spdx.org/rdf/3/terms/ as base IRI for terms.

--

We may also setup URL redirections like this for all artifacts (model, context, annotation, schema):

RewriteEngine On

# 1. TEMPORARY REDIRECT (302) - This will change when a new 3.X version is released
# Change "3.0" in the target to "3.1" when 3.1 is released
RewriteRule ^/?rdf/3/spdx-context\.jsonld$ https://spdx.org/rdf/3.0/spdx-context.jsonld [R=302,L]
RewriteRule ^/?rdf/3/spdx-model\.ttl$ https://spdx.org/rdf/3.0/spdx-model.ttl [R=302,L]

# 2. PERMANENT REDIRECT (301) - 3.0.Y will always map back to 3.0
# Condition: Y cannot be exactly the single character "1"
RewriteRule ^/?rdf/3\.0\.(?!1$)(.+)/spdx-context\.jsonld$ https://spdx.org/rdf/3.0/spdx-context.jsonld [R=301,L]
RewriteRule ^/?rdf/3\.0\.(?!1$)(.+)/spdx-model\.ttl$ https://spdx.org/rdf/3.0/spdx-model.ttl [R=301,L]

# 3. PERMANENT REDIRECT (301) - 3.X.Y will always map back to its respective 3.X
RewriteRule ^/?rdf/3\.([^/]+)\.(.+)/spdx-context\.jsonld$ https://spdx.org/rdf/3.$1/spdx-context.jsonld [R=301,L]
RewriteRule ^/?rdf/3\.([^/]+)\.(.+)/spdx-model\.ttl$ https://spdx.org/rdf/3.$1/spdx-model.ttl [R=301,L]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Dev workflow and repo management URL URL, IRI, redirection, content negotiation and related matters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants