Repository navigation
Don't fetch a document's reference to the bblock's own JSON-LD context - #98
Merged
Merged
Conversation
When uplifting a JSON document whose @context references the validating bblock's own published context URL (e.g. a transform output that refers to its target profile's context), that context is already inlined from the local build. Fetching the URL as well would load the previously published version over it (or fail, for a local build), so drop that reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
avillar
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a JSON document is uplifted, the validating bblock's own JSON-LD context is inlined from the local build, then the document's own
@contextentries are appended. If the document references the bblock's published context URL, which a transform output does when it refers to its target profile's context, that URL is fetched as well. The fetched version overrides the inlined one:phenomenonTimefrom@idto a literal) is uplifted with the old definition, so time strings become IRIs.--base-url http://localhost:...), the URL can't be reached and uplift fails.Change
RdfValidatordrops@contextentries equal to the bblock's own context URL (jsonld_url), as long as the local context was loaded. Other context entries are kept as before.Tests
tests/test_validate.py: a document that references the bblock's own context URL alongside a local context is uplifted with the inlined context, and the URL isn't fetched.Found while validating SOSA spec-example transform outputs against their target profiles (opengeospatial/ogcapi-sosa).
🤖 Generated with Claude Code