hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
1.99k stars 1.31k forks source link

Trailing comma in some schemata in hapi-fhir-validation-resources-r4 #2414

Open hdconradi opened 3 years ago

hdconradi commented 3 years ago

Some of the schemata in the hapi-fhir-validation-resources-r4 module are not valid. When trying to use them the following error can be seen:

Bad assert: XPath syntax error. Unclosed parenthesis. Suggestion: add ')'.
      f:type/@value=('choice','open-choice','decimal','integer','date','dateTime','time','string','quantity',') or not(f:answerOption or f:answerValueSet)

As a result the schemata validation is not happening at all.

As can already be seen by the error message there is a trailing ,' in the expression. The fix is thus simple: just remove the trailing ,' - unless of course there is something supposed to be after the comma ;-)

This is done in https://github.com/hapifhir/hapi-fhir/pull/2413

jamesagnew commented 3 years ago

Unfortunately this is generated code we just replicate from the FHIR spec downloads page itself. If we fix it here it'll just get replaced with the broken copy again.

Would you mind to report it to the FHIR JIRA?

https://jira.hl7.org

I'll merge the linked PR but I recommend reporting this upstream since it'll be broken again soon otherwise.

hdconradi commented 3 years ago

I was aware, that they are originated from somewhere else - but did not know where to raise an issue. Just created an account and will then create a bug.

hdconradi commented 3 years ago

https://jira.hl7.org/browse/FHIR-31376