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.
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
andEncounter.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.