I am learning how to use REST and how to validate resources using the $validate tool. So I am POST-ing resources to $validate and it is giving me very useful results.
But when I do this, and it is successful, it actually looks like the resources are being created and saved to the FHIR Server. For some reason, I didn’t think this would happen. I just want my FHIR Server to check my resource structure and validate it for now … not actually save it! Am I doing something wrong?
according to the documentation $validate does not mention anything about creating the resource, this looks like an additional feature of the server. with which server does this happen?
Servers are allowed to have side effects on operations, though this is certainly an unusual (and likely undesirable) side effect. I would certainly take it up with the server author.
Whoops! Turns out this issue was PEBCAK… ie my own fault. Thank you for clarifying how $validate should not actually create the resource you are validating.
You’re trying to validate a Bundle, or you’re posting a Bundle of validate operation invocations? Validating a Bundle should be the same as any other resource…
I am trying to validate a bundle. If I POST a bundle to
https://server.fire.ly/$validate
it works fine. But if I do the same to:
https://lforms-fhir.nlm.nih.gov/baseR4/$validate
then it fails with this error: Invalid request: The FHIR endpoint on this server does not know how to handle POST operation[$validate] with parameters [[]]
Not sure how to interpret that second error message.