Repository navigation
Fix association node URIs for CFDocuments and non-CASE targets (#44, #49) - #52
Merged
Merged
Conversation
…EdTech#44) CFAssociation.fromRaw regenerated originNodeURI.uri and destinationNodeURI.uri as /ims/case/v1p1/CFItems/{identifier} for every node, including nodes that are a CFDocument (the top-level isChildOf of every framework, and links to the CFDocument of another framework). Those URIs pointed at the CFItems endpoint for a document identifier and returned 404. A node is now regenerated as /CFDocuments/{identifier} when: - its identifier is the package's own CFDocument identifier, or - the source URI points at /CFDocuments/{identifier} (relative or absolute, any CASE version), or - the source URI is a urn:case:document: URN. All other nodes keep the existing /CFItems/{identifier} behaviour, and only the identifier and node kind are trusted from the source, so URIs are still rebased onto the local host. Because the stored URI keeps the /CFDocuments/ path, the result is stable when the package is reloaded. The package document identifier is passed from CreateFramework, ImportFramework, FileCFPackageRepository and UpdateCFAssociation.
stanbilliet
force-pushed
the
fix/44-cfdocument-node-uris
branch
from
October 21, 2026 16:49
5a60456 to
94e9a8f
Compare
…h#49) CFAssociation.fromRaw rebuilt every origin/destination node as a local CFItems reference and dropped targetType, so links to targets outside CASE (CASE 1.1 §1.9.3) lost their original uri and targetType. - Nodes with a targetType other than 'CASE' are kept exactly as supplied (title, identifier, uri, targetType). - targetType 'CASE' is kept; the uri is still rebased locally. - toJSON('1.0') no longer strips targetType from the entity's own LinkData objects (it now copies before removing the field).
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.
Fixes #44
Fixes #49
/ims/case/{version}/CFDocuments/{id}instead of/CFItems/{id}.targetTypeother thanCASEare kept as supplied (originaluriandtargetType).targetType: CASEis kept; the uri is still rebased onto the local host.toJSON('1.0')no longer stripstargetTypefrom the stored entity.CFAssociation.test.ts; full suite passes.