Add a snapshot case for a mapping identity collision - #289
Open
AltangerelG wants to merge 1 commit into
Open
AltangerelG wants to merge 1 commit into
AltangerelG wants to merge 1 commit into
Conversation
grahamegrieve
left a comment
Collaborator
There was a problem hiding this comment.
please update so that not every line of the manifest is changed
The derived profile re-declares the base profile's mapping identity for a different URI under a different name, so the base's declaration has to be renamed out of the way. On org.hl7.fhir.core master the elements end up using map11 while nothing declares it: the rename is written into name rather than identity, and update() then drops the renamed declaration because it looks the identity up in the base profile's own declarations, where a renamed identity never appears. Expected here is map11 declared with the base's uri, and no identity used on an element that is not declared. Verified in r5 and in r6: fails on master, passes with hapifhir/org.hl7.fhir.core#2659. For hapifhir/org.hl7.fhir.core#2603. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AltangerelG
force-pushed
the
test-cases/profile-mapping-identity
branch
from
September 28, 2026 17:38
bc36963 to
f90ece5
Compare
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.
Split out of #288, one case per fix as @grahamegrieve asked.
Covers hapifhir/org.hl7.fhir.core#2603,
fixed by PR #2659.
The derived profile re-declares the base's mapping identity
map1for a different URI undera different name, so the base's declaration has to be renamed to
map11.On core master the snapshot comes out with
map11used on elements and declared nowhere:With #2659 the declaration survives and nothing is orphaned.
Verified both ways in r5 and r6 — fails on core master, passes with the fix. The expected
files were generated by the fixed code and then checked against master.