Stream: committers
Topic: Build to validate search parameter paths
Rik Smithies (Jul 31 2020 at 14:32):
It seems that the build doesn't validate that search expression paths are valid. This would be a good addition, particularly because it is not easy to notice mistakes.
They don't cause examples to fail etc, so you may not know until you try them on a real server, months later at the earliest, and they don't work. It's a long compile cycle. (You can tell this has happened to me...)
Other errors are more easy to spot visually, but an invalid search parameter still appears in the HTML, just with a blank path. It has taken me a couple of years to notice this means the path is not valid (rather than too long to fit, as I thought).
It's easier than you think to make a mistake here because you can change the resource, e.g. add a backbone element, and break an existing search parameter path and never notice.
Grahame Grieve (Jul 31 2020 at 20:22):
it certainly does validate them as well as I can. Please be specific
Rik Smithies (Jul 31 2020 at 22:35):
Ah sorry there, well I actually wondered if it might, but it seems to miss at least some.
Here:
http://hl7.org/fhir/2020May/packagedproductdefinition.html#search
there is no expression showing for "device" or "manufactured-item".
It is now corrected, as of today when I fixed the path, for those two (and some additions, but that's not related):
http://build.fhir.org/packagedproductdefinition.html#search
The path until yesterday was PackagedProductDefinition.containedItem.item, which doesn't exist. It never existed, total typo by me.
It is now fixed to be PackagedProductDefinition.package.containedItem.item.
There was also a case of this earlier where a search param was pathed to a backbone element, so was basically broken. The path was a valid path, just not one that I assume could ever be a valid search parameter. The backbone element and the missing leaf attribute had the same name, so at a glance it looked ok...
Grahame Grieve (Jul 31 2020 at 22:44):
ok I'll investigate
Last updated: Apr 12 2022 at 19:14 UTC