Skip to content
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

Enhance new validator w.r.t. circular references #286

Open
LuudSlagter opened this issue Feb 16, 2024 · 1 comment
Open

Enhance new validator w.r.t. circular references #286

LuudSlagter opened this issue Feb 16, 2024 · 1 comment
Assignees

Comments

@LuudSlagter
Copy link

In the new validator, circular references result in a validation warning of the form:

[WARNING] Detected a loop: instance data inside 'Bundle.entry[1].resource[0]' refers back to itself. (at Bundle.entry[1].resource[0])

It would be a nice enhancement to indicate the exact elements that together contain the circular reference, or at least indicate the element containing the reference in the resource that triggered the validation warning.

Example
Suppose a Bundle contains a Condition and Encounter resource that reference each other via Condition.encounter and Encounter.diagnosis.condition. Then a validation warning of the form

[WARNING] Detected a loop: instance data inside 'Bundle.entry[1].resource[0]' refers back to itself. (at Bundle.entry[1].resource[0].encounter and Bundle.entry[2].resource[0].diagnosis[0].condition)

would be ideal, but a validation warning of the form

[WARNING] Detected a loop: instance data inside 'Bundle.entry[1].resource[0]' refers back to itself. (at Bundle.entry[1].resource[0].encounter)

would already be helpful to easily find the circular reference.

@mmsmits mmsmits transferred this issue from FirelyTeam/firely-net-sdk Feb 16, 2024
@mmsmits
Copy link
Member

mmsmits commented Feb 16, 2024

Transferred from SDK to Validator repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants