You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Validator throws circular reference error when a contained resource references another contained resource, even when there is no cycle. This is because the internalReferenceNavEvent strips the index from the resolved reference, and so the validation logger cannot distinguish between contained[0] and contained[1]
to replicate:
[TestMethod]publicvoidNoCircularInContainedResources(){// no circular in contained patientsvarpat=new{resourceType="Patient",id="pat1",contained=new[]{new{resourceType="Patient",id="pat2a",other=new{_type="Reference",reference="#pat2b"}},new{resourceType="Patient",id="pat2b",other=new{_type="Reference",reference=""}}}};varresult=test(SCHEMA,pat.DictionaryToTypedElement("Patient"));result.IsSuccessful.Should().BeTrue();result.Evidence.Should().Contain(ass =>(assasIssueAssertion)!.IssueNumber==Issue.CONTENT_REFERENCE_CYCLE_DETECTED.Code);// Passes???}
The text was updated successfully, but these errors were encountered:
The Validator throws circular reference error when a contained resource references another contained resource, even when there is no cycle. This is because the internalReferenceNavEvent strips the index from the resolved reference, and so the validation logger cannot distinguish between contained[0] and contained[1]
to replicate:
The text was updated successfully, but these errors were encountered: