Skip to content

Commit

Permalink
:bugs: fix: Fix the bug in validation for undefined elements within a…
Browse files Browse the repository at this point in the history
… Backbone type element. Fixes:#36
  • Loading branch information
Tuncay NAMLI committed Nov 26, 2021
1 parent 142be0f commit f452068
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class FhirContentValidator(fhirConfig:FhirConfig, profileUrl:String, referenceRe
extractFieldNameAndDataType(field, allRestrictions) match {
//If there is no definition for the element, return error
case None =>
if(!isAllAbstract || forceRecognitionOfElementsEvenForAbstractChain)
if(!isAllAbstract || resourceElementRestrictions.nonEmpty || forceRecognitionOfElementsEvenForAbstractChain)
FhirContentValidator.convertToOutcomeIssue(FHIRUtil.mergeElementPath(parentPath, field), Seq(ConstraintFailure(s"Unrecognized element '${FHIRUtil.mergeElementPath(parentPath, field)}' !")))
else //If we are validating against an abstract chain just ignore unknown elements
Nil
Expand Down

0 comments on commit f452068

Please sign in to comment.