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
Validating a resource with CodeableReference throws an exception System.InvalidOperationException: 'Checking reference type should have been handled already.'#275
We're currently evaluating moving to the new validator and found a bug when the resource as a CodeableReference property.
The code for validating references does not handle CodeableReference values properly throws an exception.
System.InvalidOperationException: 'Checking reference type should have been handled already.'
at Firely.Fhir.Validation.ReferencedInstanceValidator.Validate(IScopedNode input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.AssertionValidators.<ValidateMany>g__repeat|4_0(IValidatable assertion, IEnumerable`1 input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.AssertionValidators.ValidateMany(IAssertion assertion, IEnumerable`1 input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.AllValidator.<>c__DisplayClass12_0.<Validate>b__0(IAssertion ma)
at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
at System.Linq.Enumerable.SelectArrayIterator`2.ToList()
at Firely.Fhir.Validation.AllValidator.Validate(IEnumerable`1 input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.AssertionValidators.ValidateMany(IAssertion assertion, IEnumerable`1 input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.ElementSchema.<>c__DisplayClass19_0.<ValidateInternal>b__0(IAssertion ma)
at System.Linq.Enumerable.WhereSelectListIterator`2.ToList()
at Firely.Fhir.Validation.ElementSchema.ValidateInternal(IEnumerable`1 input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.ElementSchema.Firely.Fhir.Validation.IGroupValidatable.Validate(IEnumerable`1 input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.AssertionValidators.ValidateMany(IAssertion assertion, IEnumerable`1 input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.ChildrenValidator.<>c__DisplayClass13_0.<Validate>b__0(Match m)
at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
at Firely.Fhir.Validation.ChildrenValidator.Validate(IScopedNode input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.AssertionValidators.ValidateOne(IAssertion assertion, IScopedNode input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.ElementSchema.<>c__DisplayClass21_0.<ValidateInternal>b__0(IAssertion ma)
at System.Linq.Enumerable.WhereSelectListIterator`2.ToList()
at Firely.Fhir.Validation.ElementSchema.ValidateInternal(IScopedNode input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.FhirSchema.ValidateInternal(IScopedNode input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.ResourceSchema.<>n__0(IScopedNode input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.ResourceSchema.<>c__DisplayClass5_0.<ValidateResourceSchema>b__0()
at Firely.Fhir.Validation.ValidationLogger.Start(ValidationState state, String profileUrl, Func`1 validator)
at Firely.Fhir.Validation.ResourceSchema.ValidateResourceSchema(IScopedNode input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.ResourceSchema.<>c__DisplayClass4_0.<ValidateInternal>b__6(ResourceSchema s)
at System.Linq.Enumerable.SelectEnumerableIterator`2.ToList()
at Firely.Fhir.Validation.ResourceSchema.ValidateInternal(IScopedNode input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.ResourceSchema.<>c__DisplayClass3_0.<ValidateInternal>b__0(IScopedNode i, Int32 index)
at System.Linq.Enumerable.<SelectIterator>d__229`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Firely.Fhir.Validation.ResourceSchema.ValidateInternal(IEnumerable`1 input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.SchemaReferenceValidator.Validate(IEnumerable`1 input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.SchemaReferenceValidator.Validate(IScopedNode input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.AssertionValidators.ValidateOne(IAssertion assertion, IScopedNode input, ValidationSettings vc, ValidationState state)
at Firely.Fhir.Validation.AssertionValidators.Validate(IAssertion assertion, IScopedNode input, ValidationSettings vc)
at Firely.Fhir.Validation.Validator.Validate(IScopedNode sn, String profile)
at Firely.Fhir.Validation.Validator.Validate(Resource instance, String profile)
at Program.<Main>$(String[] args) in U:\source\ConsoleApp1\ConsoleApp1\Program.cs:line 66
The text was updated successfully, but these errors were encountered:
We're currently evaluating moving to the new validator and found a bug when the resource as a CodeableReference property.
The code for validating references does not handle CodeableReference values properly throws an exception.
Reproduction code:
Exception:
The text was updated successfully, but these errors were encountered: