Closed mattkoch614 closed 4 years ago
I'd check the version of the fhir libs that you're using, that might cause issues there, also consider the http://github.com/brianpos/fhir-net-web-api facade project that does all the interface bindings, and let's you worry about the actual functionality you want to handle. Also handles xml and json without extra code on your side. Theres a demo in there showing a server that uses the file system for storage.
Thanks @brianpos. We got around this by accepting a JObject
as a parameter in the Controller method instead of a strongly typed Questionnaire, and then just parsing the text representation of that into a Questionnaire. This works for our use case.
The question has been answered. I close this issue.
I have a controller method that is attempting to run model binding validation on a Questionnaire (json) being passed in via a POST request.
The Questionnaire JSON representation is simple, and model validation consistently fails when it tries to deal with the
purpose
attribute:Here's a snippet from the Controller method:
It seems that using a simple string for "Purpose" fails because it can't convert it to "Hl7.Fhir.Model.Markdown" but the FHIR spec indicates that string representations should be valid (for Markdown data types.):