-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spark accepts a single contained with multiple resources #20
Comments
If you put multiple resources within the tag, the server will create a resource, but only the first contained resource will be saved. |
Could you also give me an example for this? It is not clear in what tag can one add multiple resources. I have tried it with a couple of tags and parsing throws an exception. |
It's been too long ago, I don't understand this bug-report myself anymore, but it seems Mirjam still does ;-) |
The issue is with contained resources. Try posting:
The contained tag is invalid since it can only contain 1 resource, but spark accepts it and stores the first organization. |
or is this example wrong?
|
Yes, it is possible to have multiple contained resources, but they should be in their own |
Thank you. That clears things out. |
Yes, the fact that Json has an array notation ([]) and you cannot repeat properties in Json makes all the difference here... |
So, this seems indeed to be a FHIR .NET Api bug (at least the part about accepting more resources in a contained tag). Related to the second problem that we don't check if the actual contained resource is used anywhere in the resource, this would imply a validation step after the resource is constructed. Should this happen in Spark? or it would be better to make sure all parsed resources are correct? I think this should be part of implementing the rest of the validation support in Spark (that is currently missing - see Spark.Service.Validate). Maybe after implementation this could also be exported as a separate library. |
We are experiencing the same issue currently. So just to clarify, should we be saving our contained resources using the following format? Will this deserialise correctly? |
Yes, this should be handled correctly. If Spark doesn't please leave a new comment here. |
You can send a Resource to Spark with just one tag, with multiple resources inside it. This is a bug, probably due to a bug in the .NET API.
The text was updated successfully, but these errors were encountered: