Stream: hapi
Topic: Plain validate provider?
Patrick Werner (Aug 19 2019 at 15:55):
I just played around with hapi's resource providers and built one to validate Patients. Works nice!
But now i tried to extend it to a PlainProvider to get this working independent of the Resource type, which i couldn't.
Currently my validate method looks like that:
@Validate public MethodOutcome validate(@ResourceParam Resource resource) {
Which causesCaused by: ca.uhn.fhir.context.ConfigurationException: Invalid type for @OperationParam: org.hl7.fhir.dstu3.model.DomainResource
Patrick Werner (Aug 19 2019 at 15:55):
Is it possible to build a plain validate provider?
James Agnew (Aug 19 2019 at 21:55):
You probably want to use IBaseResource
as the parameter type
Patrick Werner (Aug 20 2019 at 08:00):
of course. Thanks. (sometimes I'm really stupid )
James Agnew (Aug 20 2019 at 09:57):
Hah, I mean I do think it would make sense for us to also accept Resource!
Last updated: Apr 12 2022 at 19:14 UTC