Stream: implementers
Topic: Calling validator as a java function
Malcolm McRoberts (Mar 09 2022 at 16:55):
I've got a large number of resources that I'd like to validate, so I'd like to just include the validator as a library and pass a JSON string to a java function in process. Anybody have experience doing that or an example? Everything I see is either a CLI or web interface. I've got ETL running in Spark so I should be able to call Java functions natively without network or process overhead. Thanks.
Lloyd McKenzie (Mar 09 2022 at 17:12):
@Mark Iantorno
Mark Iantorno (Mar 09 2022 at 17:54):
Ah, take a look at the validator-wrapper website repo
Mark Iantorno (Mar 09 2022 at 17:54):
we do it in there
Mark Iantorno (Mar 09 2022 at 17:55):
https://github.com/hapifhir/org.hl7.fhir.validator-wrapper
Malcolm McRoberts (Mar 10 2022 at 19:25):
I pulled down that repo, but I don't see where I'm calling validator as a function. I see web calls, and cli stuff. I'm just looking to do an in-process call.
Grahame Grieve (Mar 10 2022 at 19:35):
you can look at NativeHostServices, though that's undertested. Alternatively you can look at the way that Hapi hosts the validator
Last updated: Apr 12 2022 at 19:14 UTC